summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Glondu <steph@glondu.net>2024-02-15 03:49:03 +0100
committerStephane Glondu <steph@glondu.net>2024-02-15 03:49:03 +0100
commitebf5c2c41b3dc3874c8a460438b8e99ff0f4fa71 (patch)
tree759a350cb51fc003e6e3d6474f19bd52394ce244
parenta551a23103b94e002d0244ff5b2f1409487b539a (diff)
parent9f4d87d29527f8aecd4af0264467d8ca5b176dc7 (diff)
Update upstream source from tag 'upstream/1.19'
Update to upstream version '1.19' with Debian dir c9855cba63082b2f552d302d42b83945d1a1ea0b
-rw-r--r--Changes4
-rw-r--r--cryptokit.opam4
-rw-r--r--dune-project2
-rw-r--r--src/stubs-blake2.c6
-rw-r--r--src/stubs-blake3.c3
-rw-r--r--src/stubs-chacha20.c2
6 files changed, 14 insertions, 7 deletions
diff --git a/Changes b/Changes
index b325d5b..228e580 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+Release 1.19:
+- Fix missing root registration in some Chacha20, Blake2, and
+ Blake3 functions (#34)
+
Release 1.18:
- Add BLAKE3 hash and MAC functions.
- Fix compile-time error "SSE4.1 instruction set not enabled" (#32, #33).
diff --git a/cryptokit.opam b/cryptokit.opam
index 475b448..9a5c3c9 100644
--- a/cryptokit.opam
+++ b/cryptokit.opam
@@ -1,9 +1,9 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
-version: "1.18"
+version: "1.19"
synopsis: "A library of cryptographic primitives"
description:
- "Cryptokit includes authenticated encryption (AES-GCM, Chacha20-Poly1305), block ciphers (AES, DES, 3DES), stream ciphers (Chacha20, ARCfour), public-key cryptography (RSA, DH), hashes (SHA-256, SHA-512, SHA-3, Blake2), MACs, compression, random number generation -- all presented with a compositional, extensible interface."
+ "Cryptokit includes authenticated encryption (AES-GCM, Chacha20-Poly1305), block ciphers (AES, DES, 3DES), stream ciphers (Chacha20, ARCfour), public-key cryptography (RSA, DH), hashes (SHA-256, SHA-512, SHA-3, Blake2, Blake3), MACs, compression, random number generation -- all presented with a compositional, extensible interface."
maintainer: ["Xavier Leroy <xavier.leroy@college-de-france.fr>"]
authors: ["Xavier Leroy"]
license: "LGPL-2.0-or-later WITH OCaml-LGPL-linking-exception"
diff --git a/dune-project b/dune-project
index 0f1f3e5..1207371 100644
--- a/dune-project
+++ b/dune-project
@@ -9,7 +9,7 @@
(package
(name cryptokit)
(synopsis "A library of cryptographic primitives")
- (version 1.18)
+ (version 1.19)
(license "LGPL-2.0-or-later WITH OCaml-LGPL-linking-exception")
(description "Cryptokit includes authenticated encryption (AES-GCM, Chacha20-Poly1305), block ciphers (AES, DES, 3DES), stream ciphers (Chacha20, ARCfour), public-key cryptography (RSA, DH), hashes (SHA-256, SHA-512, SHA-3, Blake2, Blake3), MACs, compression, random number generation -- all presented with a compositional, extensible interface.")
diff --git a/src/stubs-blake2.c b/src/stubs-blake2.c
index 2ccd1d3..d7aaff9 100644
--- a/src/stubs-blake2.c
+++ b/src/stubs-blake2.c
@@ -22,11 +22,12 @@
CAMLprim value caml_blake2b_init(value hashlen, value key)
{
+ CAMLparam1(key);
value ctx = caml_alloc_string(sizeof(struct blake2b));
blake2b_init(blake2b_val(ctx),
Int_val(hashlen),
caml_string_length(key), &Byte_u(key, 0));
- return ctx;
+ CAMLreturn(ctx);
}
CAMLprim value caml_blake2b_update(value ctx, value src, value ofs, value len)
@@ -50,11 +51,12 @@ CAMLprim value caml_blake2b_final(value ctx, value hashlen)
CAMLprim value caml_blake2s_init(value hashlen, value key)
{
+ CAMLparam1(key);
value ctx = caml_alloc_string(sizeof(struct blake2s));
blake2s_init(blake2s_val(ctx),
Int_val(hashlen),
caml_string_length(key), &Byte_u(key, 0));
- return ctx;
+ CAMLreturn(ctx);
}
CAMLprim value caml_blake2s_update(value ctx, value src, value ofs, value len)
diff --git a/src/stubs-blake3.c b/src/stubs-blake3.c
index 883c7f7..6de24f7 100644
--- a/src/stubs-blake3.c
+++ b/src/stubs-blake3.c
@@ -40,6 +40,7 @@ static struct custom_operations blake3_context_ops = {
CAMLprim value caml_blake3_init(value optkey)
{
+ CAMLparam1(optkey);
blake3_hasher * ctx = caml_stat_alloc(sizeof(blake3_hasher));
value res =
caml_alloc_custom(&blake3_context_ops,
@@ -51,7 +52,7 @@ CAMLprim value caml_blake3_init(value optkey)
blake3_hasher_init(ctx);
}
Context_val(res) = ctx;
- return res;
+ CAMLreturn(res);
}
CAMLprim value caml_blake3_update(value ctx,
diff --git a/src/stubs-chacha20.c b/src/stubs-chacha20.c
index 05e1557..fbc9287 100644
--- a/src/stubs-chacha20.c
+++ b/src/stubs-chacha20.c
@@ -23,7 +23,7 @@
CAMLprim value caml_chacha20_cook_key(value key, value iv, value counter)
{
- CAMLparam2(key, iv);
+ CAMLparam3(key, iv, counter);
value ckey = caml_alloc_string(Cooked_key_size);
chacha20_init(Key_val(ckey),
(unsigned char *) String_val(key), caml_string_length(key),