Skip to content

Releases: a-sit-plus/signum

3.10.0 (Supreme 0.5.0)

08 Nov 10:56
Compare
Choose a tag to compare

More cowbell targets!

A new artifact, minor breaking changes and a lot more targets ahead!

The public API remains almost unchanged. Breaking API changes are:

  • Some parsing methods migrating from a ByteIterator to kotlinx-io Source
  • Move ensureSize from package asn1 to misc
  • Change CSR to take an actual CryptoSignature instead of a ByteArray
  • Remove Legacy iOS Attestation
  • Add type parameter to JwsSigned for its payload
  • Add type parameter to JweDecrypted for its payload
  • JwsSigned.prepareSignatureInput now returns a raw ByteArray
  • Move BitSet from io to asn1 package

The internals have changed substantially, however, and some fixes lead to behavioural changes.
Therefore, be sure to match Signum versions if multiple libraries pull it in as transitive dependency.
Better safe than sorry!
The full list of changes is:

  • Discrete ASN.1 module indispensable-asn1 supporting the following platforms:
    • JVM
    • Android
    • iOS
    • watchOS
    • tvOS
    • JS
    • wasm/JS
    • Linux X64
    • Linux AARCH64
    • MinGw X64
  • More targets for indispensable, indispensable-josef, indispensable-cosef
    • JVM
    • Android
    • iOS
    • watchOS
    • tvOS
    • JS
    • wasm/JS
    • Linux X64
    • Linux AARCH64
    • MinGw X64
  • KmmResult 1.9.0
  • Multibase 1.2.1
  • Introduce generic tag assertion to Asn1Element
  • Change CSR to take an actual CryptoSignature instead of a ByteArray
  • Introduce shorthand to create CSR from TbsCSR
  • Introduce shorthand to create certificate from TbsCertificate
  • Remove requirement from CSR to have certificate extensions
  • Fix CoseSigned equals
  • Base OIDs on unsigned varint instead of UInt
  • Directly support UUID-based OID creation
  • Implement hash-to-curve and hash-to-scalar as per RFC9380
  • Rename decodeFromDerHexString to parseFromDerHexString
  • Move ensureSize from package asn1 to misc
  • Move BitSet from io to asn1 package
  • Use kotlinx-io as primary source for parsing
    • Base number encoding/decoding on kotlinx-io
      • Remove parsing from iterator
    • Base ASN.1 encoding and decoding on kotlinx-io
      • Remove single element decoding from Iterator
  • Introduce prepareDigestInput() to IosHomebrewAttestation
  • Remove Legacy iOS Attestation
  • Add type parameter to JwsSigned for its payload
  • Add type parameter to JweDecrypted for its payload
  • JwsSigned.prepareSignatureInput now returns a raw ByteArray
  • Tests that do not depend on BouncyCastle/JCA are now performed for all targets
  • Remove Napier dependency

3.9.0 (Supreme 0.4.0)

27 Sep 08:04
Compare
Choose a tag to compare
  • Shiny new documentation based on Material for MkDocs
  • Move Attestation from Supreme to Indispensable
  • Rename parse() to deserialize() in JwsSigned and JweEncrypted to align with COSE
  • Rename CryptoPublicKey.Rsa -> CryptoPublicKey.RSA for consistency reasons
  • Add HMAC JCA names, properties used in JSON Web Encryption

3.8.2 Hotfix

23 Sep 16:53
Compare
Choose a tag to compare

3.8.2 (Supreme 0.3.2)

  • Less destructive Hotfix for for KT-71650
  • Re-enables export of Asn1Element.Tag class to ObjC.

3.8.1 (Supreme 0.3.1)

  • Hotfix for KT-71650
  • Disables export of Asn1Element.Tag class to ObjC. Signum remains usable for KMP projects,
    the Tag class just cannot be directly accessed from Swift and ObjC any more.

3.8.0 (Supreme 0.3.0) Breaking Changes Ahead!

  • Completely revamped ASN.1 Tag Handling
    • Properly handle multi-byte tags
    • Introduce a new data structure TLV.Tag with an accompanying TagClass enum and a constructed flag to accurately represent arbitrary tags up to ULong.MAX_VALUE
    • Make all tag parameters ULong to reflect support for multi-byte tags
    • Remove DERTags
    • Revamp implicit tagging (there is still work to be done, but at least it supports CONSTRUCTED ASN.1 elements)
  • Refactor Int.Companion.decodeFromDer -> Int.Companion.decodeFromDerValue()
  • Refactor Long.Companion.decodeFromDer -> Long.Companion.decodeFromDerValue()
  • Introduce ULong.Companion.decodeFromDer which can handle overlong inputs, as long as they start with a valid ULong encoding
  • Changed return type of Verifier::verify from KmmResult<Unit> to KmmResult<Success>. Usage is unchanged.
  • Add ConfirmationClaim to represent Proof-of-Possesion Key Semantics for JWTs
  • Add claims to JsonWebToken to implement Demonstrating Proof of Possession
  • Replace JsonWebToken.confirmationKey by JsonWebToken.confirmationClaim, the implementation was wrong
  • Introduce ULong.toAsn1VarInt() to encode ULongs into ASN.1 unsigned VarInts (not to be confused with
    multi^2_base'sUVarInt!
    )
  • Introduce decodeAsn1VarULong() and decodeAsn1VarUInt() which can handle overlong inputs, as long as they start with a valid unsigned number encoding.
    • Comes in three ULong flavours:
      • Iterator<Byte>.decodeAsn1VarULong()
      • Iterable<Byte>.decodeAsn1VarULong()
      • ByteArray.decodeAsn1VarULong()
    • and three UInt flavours:
      • Iterator<Byte>.decodeAsn1VarUInt()
      • Iterable<Byte>.decodeAsn1VarUInt()
      • ByteArray.decodeAsn1VarUInt()
  • Revamp implicit tagging
  • Revamp Asn1Element.parse(), introducing new variants. This yields:
    • Asn1Element.parse() with the same semantics as before
    • Asn1Element.parse() alternative introduced, which takes a ByteIterator instead of a ByteArray
    • Asn1Element.parseAll() introduced, which consumes all bytes and returns a list of all ASN.1 elements (if parsing works)
      • Variant 1 takes a ByteIterator
      • Variant 2 takes a ByteArray
    • Asn1Element.parseFirst() introduced, which tries to only parse a single ASN.1 element from the input and leaves the rest untouched.
      • Variant 1 takes a ByteIterator and returns the element; the ByteIterator is advanced accordingly
      • Variant 2 takes a ByteArray and returns a Pair of (element, remainingBytes)
  • More consistent low-level encoding and decoding function names:
    • encodeToAsn1Primitive to produce an Asn1Primitive that can directly be DER-encoded
    • encodeToAsn1ContentBytes to produce the content bytes of a TLV primitive (the V in TLV)
    • decodeToXXX to be invoked on an Asn1Primitive to decode a DER-encoded primitive into the target type
    • decodeFromAsn1ContentBytes to be invoked on the companion of the target type to decode the content bytes of a TLV primitive (the V in TLV)
  • Update conventions -> Coroutines 1.9.0
  • replace runCatching with catching to be extra-safe

3.8.1 (0.3.1 Supreme) Hotfix

21 Sep 06:59
Compare
Choose a tag to compare

3.8.1 (Supreme 0.3.1)

  • Hotfix for KT-71650
  • Disables export of Asn1Element.Tag class to ObjC. Signum remains usable for KMP projects,
    the Tag class just cannot be directly accessed from Swift and ObjC any more.

3.8.0 (Supreme 0.3.0) Breaking Changes Ahead!

  • Completely revamped ASN.1 Tag Handling
    • Properly handle multi-byte tags
    • Introduce a new data structure TLV.Tag with an accompanying TagClass enum and a constructed flag to accurately represent arbitrary tags up to ULong.MAX_VALUE
    • Make all tag parameters ULong to reflect support for multi-byte tags
    • Remove DERTags
    • Revamp implicit tagging (there is still work to be done, but at least it supports CONSTRUCTED ASN.1 elements)
  • Refactor Int.Companion.decodeFromDer -> Int.Companion.decodeFromDerValue()
  • Refactor Long.Companion.decodeFromDer -> Long.Companion.decodeFromDerValue()
  • Introduce ULong.Companion.decodeFromDer which can handle overlong inputs, as long as they start with a valid ULong encoding
  • Changed return type of Verifier::verify from KmmResult<Unit> to KmmResult<Success>. Usage is unchanged.
  • Add ConfirmationClaim to represent Proof-of-Possesion Key Semantics for JWTs
  • Add claims to JsonWebToken to implement Demonstrating Proof of Possession
  • Replace JsonWebToken.confirmationKey by JsonWebToken.confirmationClaim, the implementation was wrong
  • Introduce ULong.toAsn1VarInt() to encode ULongs into ASN.1 unsigned VarInts (not to be confused with
    multi^2_base'sUVarInt!
    )
  • Introduce decodeAsn1VarULong() and decodeAsn1VarUInt() which can handle overlong inputs, as long as they start with a valid unsigned number encoding.
    • Comes in three ULong flavours:
      • Iterator<Byte>.decodeAsn1VarULong()
      • Iterable<Byte>.decodeAsn1VarULong()
      • ByteArray.decodeAsn1VarULong()
    • and three UInt flavours:
      • Iterator<Byte>.decodeAsn1VarUInt()
      • Iterable<Byte>.decodeAsn1VarUInt()
      • ByteArray.decodeAsn1VarUInt()
  • Revamp implicit tagging
  • Revamp Asn1Element.parse(), introducing new variants. This yields:
    • Asn1Element.parse() with the same semantics as before
    • Asn1Element.parse() alternative introduced, which takes a ByteIterator instead of a ByteArray
    • Asn1Element.parseAll() introduced, which consumes all bytes and returns a list of all ASN.1 elements (if parsing works)
      • Variant 1 takes a ByteIterator
      • Variant 2 takes a ByteArray
    • Asn1Element.parseFirst() introduced, which tries to only parse a single ASN.1 element from the input and leaves the rest untouched.
      • Variant 1 takes a ByteIterator and returns the element; the ByteIterator is advanced accordingly
      • Variant 2 takes a ByteArray and returns a Pair of (element, remainingBytes)
  • More consistent low-level encoding and decoding function names:
    • encodeToAsn1Primitive to produce an Asn1Primitive that can directly be DER-encoded
    • encodeToAsn1ContentBytes to produce the content bytes of a TLV primitive (the V in TLV)
    • decodeToXXX to be invoked on an Asn1Primitive to decode a DER-encoded primitive into the target type
    • decodeFromAsn1ContentBytes to be invoked on the companion of the target type to decode the content bytes of a TLV primitive (the V in TLV)
  • Update conventions -> Coroutines 1.9.0
  • replace runCatching with catching to be extra-safe

3.8.0 (Supreme 0.3.0)

20 Sep 13:03
Compare
Choose a tag to compare

Breaking Changes Ahead!

  • Completely revamped ASN.1 Tag Handling
    • Properly handle multi-byte tags
    • Introduce a new data structure TLV.Tag with an accompanying TagClass enum and a constructed flag to accurately represent arbitrary tags up to ULong.MAX_VALUE
    • Make all tag parameters ULong to reflect support for multi-byte tags
    • Remove DERTags
    • Revamp implicit tagging (there is still work to be done, but at least it supports CONSTRUCTED ASN.1 elements)
  • Refactor Int.Companion.decodeFromDer -> Int.Companion.decodeFromDerValue()
  • Refactor Long.Companion.decodeFromDer -> Long.Companion.decodeFromDerValue()
  • Introduce ULong.Companion.decodeFromDer which can handle overlong inputs, as long as they start with a valid ULong encoding
  • Changed return type of Verifier::verify from KmmResult<Unit> to KmmResult<Success>. Usage is unchanged.
  • Add ConfirmationClaim to represent Proof-of-Possesion Key Semantics for JWTs
  • Add claims to JsonWebToken to implement Demonstrating Proof of Possession
  • Replace JsonWebToken.confirmationKey by JsonWebToken.confirmationClaim, the implementation was wrong
  • Introduce ULong.toAsn1VarInt() to encode ULongs into ASN.1 unsigned VarInts (not to be confused with
    multi^2_base'sUVarInt!
    )
  • Introduce decodeAsn1VarULong() and decodeAsn1VarUInt() which can handle overlong inputs, as long as they start with a valid unsigned number encoding.
    • Comes in three ULong flavours:
      • Iterator<Byte>.decodeAsn1VarULong()
      • Iterable<Byte>.decodeAsn1VarULong()
      • ByteArray.decodeAsn1VarULong()
    • and three UInt flavours:
      • Iterator<Byte>.decodeAsn1VarUInt()
      • Iterable<Byte>.decodeAsn1VarUInt()
      • ByteArray.decodeAsn1VarUInt()
  • Revamp implicit tagging
  • Revamp Asn1Element.parse(), introducing new variants. This yields:
    • Asn1Element.parse() with the same semantics as before
    • Asn1Element.parse() alternative introduced, which takes a ByteIterator instead of a ByteArray
    • Asn1Element.parseAll() introduced, which consumes all bytes and returns a list of all ASN.1 elements (if parsing works)
      • Variant 1 takes a ByteIterator
      • Variant 2 takes a ByteArray
    • Asn1Element.parseFirst() introduced, which tries to only parse a single ASN.1 element from the input and leaves the rest untouched.
      • Variant 1 takes a ByteIterator and returns the element; the ByteIterator is advanced accordingly
      • Variant 2 takes a ByteArray and returns a Pair of (element, remainingBytes)
  • More consistent low-level encoding and decoding function names:
    • encodeToAsn1Primitive to produce an Asn1Primitive that can directly be DER-encoded
    • encodeToAsn1ContentBytes to produce the content bytes of a TLV primitive (the V in TLV)
    • decodeToXXX to be invoked on an Asn1Primitive to decode a DER-encoded primitive into the target type
    • decodeFromAsn1ContentBytes to be invoked on the companion of the target type to decode the content bytes of a TLV primitive (the V in TLV)
  • Update conventions -> Coroutines 1.0.9
  • replace runCatching with catching to be extra-safe

Closed Issues:

3.7.0 (Supreme 0.2.0)

05 Sep 04:48
Compare
Choose a tag to compare
  • Remove Swift verifier logic to obtain a general speed-up
  • Implement supreme signing capabilities
  • Introduce Attestation Data Structure
  • Dependency Updates:
    • Kotlin 2.0.20
    • kotlinx.serialization 1.7.2 stable (bye, bye unofficial snapshot dependency!)
    • kotlinx-datetime 0.6.1

3.6.1

14 Aug 15:51
Compare
Choose a tag to compare

Externalise UVarInt

3.6.0: Signum

02 Aug 12:43
fc3e39a
Compare
Choose a tag to compare
  • Rebranding to Signum
    • maven coordinates: at.asitplus.signum:$module
    • modules
      • datatypes -> indispensable
      • datatypes-jws -> indispensable-josef
      • datatypes-cose -> indispensable-cosef
      • provider -> supreme
    • package renames
    • crypto -> signum
    • datatypes -> indispensable
    • jws -> josef
    • cose -> cosef
    • provider -> supreme

3.5.1

25 Jul 08:43
Compare
Choose a tag to compare

** Fixes **

  • Publish provider pre-release to maven central

** Changes **

  • Depend on newer conventions, which don't pull serialization snapshots in:
    • datatypes, datatypes-jws, and provider depend on stable serialization WITHOUT COSE SUPPORT
    • datatypes-cose pulls in latest 1.8.0 serialization SNAPSHOT from upstream
  • ByteStringWrapper is not part of upstream snapshot cose serialization anymore,
    but implemented as part of datatypes-cose in package at.asitplus.crypto.datatypes.cose.io

Release 3.5.0

22 Jul 10:10
Compare
Choose a tag to compare

Fixes

  • Fix calculation of JWK thumbprints according to RFC7638

Changes

  • Add provider module that actually implements cryptography! (Currently in preview, signature verification only)
  • Add COSE_Key header to CoseHeader, defined in OpenID for Verifiable Credential Issuance draft 13
  • Fix serialization of COSE signature structures
  • Refactor JsonWebKey:
    • Remove identifier, please use keyId or jwkThumbprint directly
    • Add equalsCryptographically() to compare two keys by their cryptographic properties only
  • Externalise multibase implementation