-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
randombytes_salsa20_random replaced by randombytes_internal_implementation Forgot to update package.d
- Loading branch information
Showing
8 changed files
with
121 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/******************************************************************************* | ||
D language bindings for libsodium's crypto_core_ristretto255.h | ||
License: ISC (see LICENSE.txt) | ||
*******************************************************************************/ | ||
|
||
module libsodium.crypto_core_ristretto255; | ||
|
||
@nogc nothrow: | ||
|
||
import libsodium.export_; | ||
|
||
extern (C): | ||
|
||
enum crypto_core_ristretto255_BYTES = 32; | ||
size_t crypto_core_ristretto255_bytes (); | ||
|
||
enum crypto_core_ristretto255_HASHBYTES = 64; | ||
size_t crypto_core_ristretto255_hashbytes (); | ||
|
||
enum crypto_core_ristretto255_SCALARBYTES = 32; | ||
size_t crypto_core_ristretto255_scalarbytes (); | ||
|
||
enum crypto_core_ristretto255_NONREDUCEDSCALARBYTES = 64; | ||
size_t crypto_core_ristretto255_nonreducedscalarbytes (); | ||
|
||
int crypto_core_ristretto255_is_valid_point (const(ubyte)* p); | ||
|
||
int crypto_core_ristretto255_add (ubyte* r, const(ubyte)* p, const(ubyte)* q); | ||
|
||
int crypto_core_ristretto255_sub (ubyte* r, const(ubyte)* p, const(ubyte)* q); | ||
|
||
int crypto_core_ristretto255_from_hash (ubyte* p, const(ubyte)* r); | ||
|
||
void crypto_core_ristretto255_random (ubyte* p); | ||
|
||
void crypto_core_ristretto255_scalar_random (ubyte* r); | ||
|
||
int crypto_core_ristretto255_scalar_invert (ubyte* recip, const(ubyte)* s); | ||
|
||
void crypto_core_ristretto255_scalar_negate (ubyte* neg, const(ubyte)* s); | ||
|
||
void crypto_core_ristretto255_scalar_complement (ubyte* comp, const(ubyte)* s); | ||
|
||
void crypto_core_ristretto255_scalar_add ( | ||
ubyte* z, | ||
const(ubyte)* x, | ||
const(ubyte)* y); | ||
|
||
void crypto_core_ristretto255_scalar_sub ( | ||
ubyte* z, | ||
const(ubyte)* x, | ||
const(ubyte)* y); | ||
|
||
void crypto_core_ristretto255_scalar_mul ( | ||
ubyte* z, | ||
const(ubyte)* x, | ||
const(ubyte)* y); | ||
|
||
/* | ||
* The interval `s` is sampled from should be at least 317 bits to ensure almost | ||
* uniformity of `r` over `L`. | ||
*/ | ||
void crypto_core_ristretto255_scalar_reduce (ubyte* r, const(ubyte)* s); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/******************************************************************************* | ||
D language bindings for libsodium's crypto_scalarmult_ristretto255.h | ||
License: ISC (see LICENSE.txt) | ||
*******************************************************************************/ | ||
|
||
module libsodium.crypto_scalarmult_ristretto255; | ||
|
||
@nogc nothrow: | ||
|
||
import libsodium.export_; | ||
|
||
extern (C): | ||
|
||
enum crypto_scalarmult_ristretto255_BYTES = 32U; | ||
size_t crypto_scalarmult_ristretto255_bytes (); | ||
|
||
enum crypto_scalarmult_ristretto255_SCALARBYTES = 32U; | ||
size_t crypto_scalarmult_ristretto255_scalarbytes (); | ||
|
||
/* | ||
* NOTE: Do not use the result of this function directly for key exchange. | ||
* | ||
* Hash the result with the public keys in order to compute a shared | ||
* secret key: H(q || client_pk || server_pk) | ||
* | ||
* Or unless this is not an option, use the crypto_kx() API instead. | ||
*/ | ||
int crypto_scalarmult_ristretto255 (ubyte* q, const(ubyte)* n, const(ubyte)* p); | ||
|
||
int crypto_scalarmult_ristretto255_base (ubyte* q, const(ubyte)* n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters