Skip to content

Web-eID "algorithm" is not compliant with the official documentation anymore #18

Open

Description

@ojacomarket

In the code the public key algorithm is defined with https://github.com/open-eid/nfc-iOS-lib/blob/main/nfc-lib/nfc-lib/nfclib/Utilities/Utilities.swift#L26-L27.

When it is time to produce a Web-eID token, the algorithm name is being fed as-is https://github.com/open-eid/nfc-iOS-lib/blob/main/nfc-lib/nfc-lib/nfclib/WebEID/OperationAuthenticateWithWebEID.swift#L159.

This breaks the official Web-eID documentation regarding "algorithm", which states that https://github.com/web-eid/web-eid-system-architecture-doc#token-format.

Whereas be23a4a version of nfclib did it correctly

guard let webEidAlg = mapToAlgorithm(algorithm: algorithmData.algorithm, bitLength: algorithmData.keyLength) else {
let errorMessage = "Andmete lugemine ebaõnnestus"
session.invalidate(errorMessage: errorMessage)
continuation?.resume(throwing: AuthenticateWithWebEidError.failedToMapAlgorithm)
return
}
, by adjusting code specific format to the documentation.

Activity

  1. martenrebane commented on Oct 12, 2026

    @martenrebane
    Contributor

    Thanks for the report, this is fixed in #19.

    The algorithm is derived from the authentication key and is always a valid JWA name.

    You can test it from the branch and let us know if anything still looks off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions