pack

fun pack(algorithm: SkAlgorithm, rawSignature: ByteArray, flags: Byte, counter: UInt): ByteArray(source)

Pack an SK assertion into the OpenSSH SK signature blob.

Return

The full OpenSSH SK signature wire blob.

Parameters

algorithm

SK algorithm.

rawSignature

For SkAlgorithm.ED25519: the raw 64-byte Ed25519 signature from the authenticator. For SkAlgorithm.ECDSA_P256: the DER-encoded SEQUENCE { INTEGER r, INTEGER s } signature from CTAP2.

flags

Authenticator flags byte (see FLAG_USER_PRESENCE, FLAG_USER_VERIFICATION).

counter

Authenticator signature counter (big-endian uint32 on the wire).

Throws

if rawSignature has the wrong size or is malformed.