iya-sts
    Preparing search index...

    The wire format of PKINIT (RFC 4556 with RFC 8070's freshness token, RFC 8636's KDF agility and RFC 8062's PA-PKINIT-KX): structures to DER and back. It knows no key and no policy; a structure that does not decode throws. A static utility class.

    Index
    AD_INITIAL_VERIFIED_CAS: 9

    The authorization data type AD-INITIAL-VERIFIED-CAS (RFC 4556).

    ERROR: {
        CANT_VERIFY_CERTIFICATE: number;
        CLIENT_NAME_MISMATCH: number;
        CLIENT_NOT_TRUSTED: number;
        DH_KEY_PARAMETERS_NOT_ACCEPTED: number;
        DIGEST_IN_CERT_NOT_ACCEPTED: number;
        DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED: number;
        INCONSISTENT_KEY_PURPOSE: number;
        INVALID_CERTIFICATE: number;
        INVALID_SIG: number;
        NO_ACCEPTABLE_KDF: number;
        PA_CHECKSUM_MUST_BE_INCLUDED: number;
        PREAUTH_EXPIRED: number;
        PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED: number;
        REVOCATION_STATUS_UNKNOWN: number;
        REVOKED_CERTIFICATE: number;
    } = ...

    The error codes of RFC 4556 section 3.1.3 and RFC 8636 section 6.

    KEY_USAGE_PA_PKINIT_KX: 44

    RFC 8062 section 7's key usage for PA-PKINIT-KX.

    PA: {
        AS_FRESHNESS: number;
        PK_AS_REP: number;
        PK_AS_REQ: number;
        PKINIT_KX: number;
    } = ...

    The padata types: RFC 4556's request and reply, RFC 8062's PA-PKINIT-KX and RFC 8070's PA-AS-FRESHNESS.

    TD: {
        CERT_DIGEST_ALGORITHMS: number;
        CMS_DIGEST_ALGORITHMS: number;
        DH_PARAMETERS: number;
        INVALID_CERTIFICATES: number;
        TRUSTED_CERTIFIERS: number;
    } = ...

    The typed-data types: RFC 4556's three and RFC 8636's two.

    • Decodes a BIT STRING of whole octets.

      Parameters

      • t: any

        the TLV

      Returns Uint8Array

      the octets

      Error when it is not one, or has unused bits

    • Decodes an OBJECT IDENTIFIER.

      Parameters

      • t: any

        the TLV

      Returns string

      the OID, dotted

      Error when it is not one

    • Encodes an AuthPack, for a client (the suite's own).

      Parameters

      • pack: any

        { cusec, ctime, nonce, paChecksum, freshnessToken, clientPublicValue, supportedKdfs, clientDhNonce }

      Returns Uint8Array

      the DER

    • Encodes a BIT STRING of whole octets (no unused bits).

      Parameters

      • bytes: Uint8Array

        the octets

      Returns Uint8Array

      the DER

    • Encodes an ExternalPrincipalIdentifier.

      Parameters

      • epi: any

        { subjectName, issuerAndSerialNumber, subjectKeyIdentifier }, each the DER the field holds, or null

      Returns Uint8Array

      the DER

    • Encodes a KDCDHKeyInfo.

      Parameters

      • info: any

        { subjectPublicKey, nonce }

      Returns Uint8Array

      the DER

    • Encodes a KDFAlgorithmId.

      Parameters

      • oid: string

        the KDF's OID

      Returns Uint8Array

      the DER

    • Encodes a KRB5PrincipalName.

      Parameters

      • realm: string

        the realm

      • name: any

        the PrincipalName, { type, name }

      Returns Uint8Array

      the DER

    • Encodes an OBJECT IDENTIFIER.

      Parameters

      • dotted: string

        the OID, dotted

      Returns Uint8Array

      the DER

    • Encodes RFC 8636's OtherInfo, the KDF's context.

      Parameters

      • opts: any

        kdf (the OID), client and server (KRB5PrincipalName DER), etype, asReq (the AS-REQ as received) and pkAsRep (the PA-PK-AS-REP's DER)

      Returns Uint8Array

      the DER

    • Encodes a PA-PK-AS-REP carrying a DHRepInfo, the CHOICE's [0] explicit.

      Parameters

      • rep: any

        { dhSignedData, kdf }; kdf is an OID, or null for RFC 4556's own derivation

      Returns Uint8Array

      the DER

    • Encodes a PA-PK-AS-REQ.

      Parameters

      • req: any

        { signedAuthPack, kdcPkId }

      Returns Uint8Array

      the DER

    • Encodes a SEQUENCE OF already-encoded elements — TD-DH-PARAMETERS, TD-CMS-DIGEST-ALGORITHMS, TD-TRUSTED-CERTIFIERS.

      Parameters

      • elements: Uint8Array<ArrayBufferLike>[]

        the DER of each

      Returns Uint8Array

      the DER

    • Encodes a TYPED-DATA.

      Parameters

      • list: any[]

        { type, value } entries

      Returns Uint8Array

      the DER

    • Encodes AD-INITIAL-VERIFIED-CAS as an authorization data element.

      Parameters

      • epis: any[]

        the ExternalPrincipalIdentifiers of the path's CAs

      Returns any

      { type, data }

    • Decodes an AuthPack. The clientPublicValue is handed back as its DER.

      Parameters

      • bytes: Uint8Array

        the SignedData's eContent

      Returns any

      { cusec, ctime, nonce, paChecksum, freshnessToken, clientPublicValue, supportedKdfs, clientDhNonce, supportedCmsTypes }; supportedKdfs is null when the field is absent

      Error when it does not decode

    • Decodes a KDCDHKeyInfo, for a client (the suite's own).

      Parameters

      • bytes: Uint8Array

        the DER

      Returns any

      { subjectPublicKey, nonce }

      Error when it does not decode

    • Decodes a KDFAlgorithmId.

      Parameters

      • t: any

        the SEQUENCE's TLV

      Returns string

      the KDF's OID

      Error when it does not decode

    • Decodes a KRB5PrincipalName.

      Parameters

      • bytes: Uint8Array

        the DER

      Returns any

      { realm, name }

      Error when it does not decode

    • Decodes a PA-PK-AS-REP's DHRepInfo, IMPLICIT or EXPLICIT, for a client (the suite's own).

      Parameters

      • bytes: Uint8Array

        the padata value

      Returns any

      { dhSignedData, kdf }

      Error when it does not decode

    • Decodes a PA-PK-AS-REQ. The trusted certifiers are kept as their DER, since they are hints this KDC does not need: it has one chain.

      Parameters

      • bytes: Uint8Array

        the padata value

      Returns any

      { signedAuthPack, trustedCertifiers, kdcPkId }

      Error when it does not decode

    • Decodes a TYPED-DATA, for a client (the suite's own).

      Parameters

      • bytes: Uint8Array

        the e-data

      Returns any[]

      { type, value } entries

      Error when it does not decode