Skip to content

1.0.0

Compare
Choose a tag to compare
@hannesm hannesm released this 29 Jun 06:17
· 14 commits to main since this release

CHANGES:

Breaking changes

  • mirage-crypto: Poly1305 API now uses string (#203 @hannesm)
  • mirage-crypto: Poly1305 no longer has type alias "type mac = string"
    (#232 @hannesm)
  • mirage-crypto: the API uses string instead of cstruct (#214 @reynir @hannesm)
  • mirage-crypto: Hash module has been removed. Use digestif if you need hash
    functions (#213 @hannesm)
  • mirage-crypto: the Cipher_block and Cipher_stream modules have been removed,
    its contents is inlined:
    Mirage_crypto.Cipher_block.S -> Mirage_crypto.Block
    Mirage_crypto.Cipher_stream.S -> Mirage_crypto.Stream
    Mirage_crypto.Cipher_block.AES.CTR -> Mirage_crypto.AES.CTR
    (#225 @hannesm, suggested in #224 by @reynir)
  • mirage-crypto-pk: s-expression conversions for private and public keys (Dh,
    Dsa, Rsa) have been removed. You can use PKCS8 for encoding and decoding
    X509.{Private,Public}_key.{en,de}code_{der,pem} (#208 @hannesm)
  • mirage-crypto-pk: in the API, Cstruct.t is no longer present. Instead,
    string is used (#211 @reynir @hannesm)
  • mirage-crypto-rng: the API uses string instead of Cstruct.t. A new function
    generate_into : ?g -> bytes -> ?off:int -> int -> unit is provided
    (#212 @hannesm @reynir)
  • mirage-crypto-ec: remove NIST P224 support (#209 @hannesm @Firobe)
  • mirage-crypto: in Uncommon.xor_into the arguments ~src_off and ~dst_off are
    required now (#232 @hannesm), renamed to unsafe_xor_into
    (98f01b1)
  • mirage-crypto-pk, mirage-crypto-rng: remove type alias "type bits = int"
    (#236 @hannesm)

Bugfixes

  • mirage-crypto (32 bit systems): CCM with long adata (#207 @reynir)
  • mirage-crypto-ec: fix K_gen for bitlen mod 8 != 0 (reported in #105 that
    P521 test vectors don't pass, re-reported #228, fixed #230 @Firobe)
  • mirage-crypto-ec: zero out bytes allocated for Field_element.zero (reported
    mirleft/ocaml-x509#167, fixed #226 @dinosaure)

Data race free

  • mirage-crypto (3DES): avoid global state in key derivation (#223 @hannesm)
  • mirage-crypto-rng: use atomic instead of reference to be domain-safe (#221
    @dinosaure @reynir @hannesm)
  • mirage-crypto, mirage-crypto-rng, mirage-crypto-pk, mirage-crypto-ec:
    avoid global buffers, use freshly allocated strings/bytes instead, avoids
    data races (#186 #219 @dinosaure @reynir @hannesm)

Other changes

  • mirage-crypto: add {de,en}crypt_into functions (and unsafe variants) to allow
    less buffer allocations (#231 @hannesm)
  • mirage-crypto-rng-miou: new package which adds rng support with miou
    (#227 @dinosaure)
  • PERFORMANCE mirage-crypto: ChaCha20/Poly1305 use string instead of Cstruct.t,
    ChaCha20 interface unchanged, performance improvement roughly 2x
    (#203 @hannesm @reynir)
  • mirage-crypto-ec, mirage-crypto-pk, mirage-crypto-rng: use digestif for
    hashes (#212 #215 @reynir @hannesm)
  • mirage-crypto-rng: use a set for entropy sources instead of a list
    (#218 @hannesm)
  • mirage-crypto-rng-mirage: provide a module type S (for use instead of
    mirage-random in mirage) (#234 @hannesm)