Package-level declarations

ASN.1 modules/declarations from different RFCs, f.e. SubjectPublicKeyInfo from RFC5280 and PrivateKeyInfo from RFC5208

Types

Link copied to clipboard
Link copied to clipboard
@ExperimentalSerializationApi
abstract class AlgorithmIdentifierSerializer<AI : AlgorithmIdentifier> : KSerializer<AI>
Link copied to clipboard
@Serializable
class EcdsaSignatureValue(val r: BigInt, val s: BigInt)
Link copied to clipboard
Link copied to clipboard
@Serializable
value class EcParameters(val namedCurve: ObjectIdentifier)

Overall while it's CHOICE in ASN.1, but only namedCurve is allowed

Link copied to clipboard
@Serializable
value class EcPoint(val bytes: ByteArray)

This is EC publicKey representation for SubjectPublicKeyInfo

Link copied to clipboard
@Serializable
class EcPrivateKey(val version: Int, val privateKey: ByteArray, val parameters: EcParameters? = null, val publicKey: BitArray? = null)
Link copied to clipboard
@Serializable
class PrivateKeyInfo(val version: Int, val privateKeyAlgorithm: KeyAlgorithmIdentifier, val privateKey: ByteArray)

Attributes is not yet supported:

Link copied to clipboard
@Serializable
class RsaPrivateKey(val version: Int, val modulus: BigInt, val publicExponent: BigInt, val privateExponent: BigInt, val prime1: BigInt, val prime2: BigInt, val exponent1: BigInt, val exponent2: BigInt, val coefficient: BigInt)

OtherPrimeInfos is not supported yet:

Link copied to clipboard
@Serializable
class RsaPublicKey(val modulus: BigInt, val publicExponent: BigInt)
Link copied to clipboard
@Serializable
class SubjectPublicKeyInfo(val algorithm: KeyAlgorithmIdentifier, val subjectPublicKey: BitArray)