@@ -13,7 +13,7 @@ Write `a + b mod 2^256` in `res`.
1313
1414 This functions returns the carry.
1515
16- The arguments a, b and res are meant to be 256-bit bignums, i.e. uint32_t[8]
16+ The arguments a, b and res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]`
1717*/
1818pub fn add ( a : & [ u32 ] , b : & [ u32 ] , res : & mut [ u32 ] ) -> u32 {
1919 let mut c: [ u32 ; 1 ] = [ 0u32 ; 1usize ] ;
@@ -45,7 +45,7 @@ Write `a - b mod 2^256` in `res`.
4545
4646 This functions returns the carry.
4747
48- The arguments a, b and res are meant to be 256-bit bignums, i.e. uint32_t[8]
48+ The arguments a, b and res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]`
4949*/
5050pub fn sub ( a : & [ u32 ] , b : & [ u32 ] , res : & mut [ u32 ] ) -> u32 {
5151 let mut c: [ u32 ; 1 ] = [ 0u32 ; 1usize ] ;
@@ -76,7 +76,7 @@ pub fn sub(a: &[u32], b: &[u32], res: &mut [u32]) -> u32 {
7676/**
7777Write `(a + b) mod n` in `res`.
7878
79- The arguments a, b, n and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
79+ The arguments a, b, n and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
8080
8181 Before calling this function, the caller will need to ensure that the following
8282 preconditions are observed.
@@ -142,7 +142,7 @@ pub fn add_mod(n: &[u32], a: &[u32], b: &[u32], res: &mut [u32]) {
142142/**
143143Write `(a - b) mod n` in `res`.
144144
145- The arguments a, b, n and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
145+ The arguments a, b, n and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
146146
147147 Before calling this function, the caller will need to ensure that the following
148148 preconditions are observed.
@@ -209,8 +209,8 @@ pub fn sub_mod(n: &[u32], a: &[u32], b: &[u32], res: &mut [u32]) {
209209/**
210210Write `a * b` in `res`.
211211
212- The arguments a and b are meant to be 256-bit bignums, i.e. uint32_t[8] .
213- The outparam res is meant to be a 512-bit bignum, i.e. uint32_t[16] .
212+ The arguments a and b are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
213+ The outparam res is meant to be a 512-bit bignum, i.e. ` uint32_t\ [16\]` .
214214*/
215215pub fn mul ( a : & [ u32 ] , b : & [ u32 ] , res : & mut [ u32 ] ) {
216216 ( res[ 0usize ..16usize ] ) . copy_from_slice ( & [ 0u32 ; 16usize ] ) ;
@@ -245,8 +245,8 @@ pub fn mul(a: &[u32], b: &[u32], res: &mut [u32]) {
245245/**
246246Write `a * a` in `res`.
247247
248- The argument a is meant to be a 256-bit bignum, i.e. uint32_t[8] .
249- The outparam res is meant to be a 512-bit bignum, i.e. uint32_t[16] .
248+ The argument a is meant to be a 256-bit bignum, i.e. ` uint32_t\[8\]` .
249+ The outparam res is meant to be a 512-bit bignum, i.e. ` uint32_t\ [16\]` .
250250*/
251251pub fn sqr ( a : & [ u32 ] , res : & mut [ u32 ] ) {
252252 ( res[ 0usize ..16usize ] ) . copy_from_slice ( & [ 0u32 ; 16usize ] ) ;
@@ -476,8 +476,8 @@ fn bn_slow_precomp(n: &[u32], mu: u32, r2: &[u32], a: &[u32], res: &mut [u32]) {
476476/**
477477Write `a mod n` in `res`.
478478
479- The argument a is meant to be a 512-bit bignum, i.e. uint32_t[16] .
480- The argument n and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
479+ The argument a is meant to be a 512-bit bignum, i.e. ` uint32_t\ [16\]` .
480+ The argument n and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
481481
482482 The function returns false if any of the following preconditions are violated,
483483 true otherwise.
@@ -863,7 +863,7 @@ fn exp_consttime(nBits: u32, n: &[u32], a: &[u32], bBits: u32, b: &[u32], res: &
863863/**
864864Write `a ^ b mod n` in `res`.
865865
866- The arguments a, n and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
866+ The arguments a, n and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
867867
868868 The argument b is a bignum of any size, and bBits is an upper bound on the
869869 number of significant bits of b. A tighter bound results in faster execution
@@ -894,7 +894,7 @@ pub fn mod_exp_vartime(n: &[u32], a: &[u32], bBits: u32, b: &[u32], res: &mut [u
894894/**
895895Write `a ^ b mod n` in `res`.
896896
897- The arguments a, n and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
897+ The arguments a, n and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
898898
899899 The argument b is a bignum of any size, and bBits is an upper bound on the
900900 number of significant bits of b. A tighter bound results in faster execution
@@ -925,7 +925,7 @@ pub fn mod_exp_consttime(n: &[u32], a: &[u32], bBits: u32, b: &[u32], res: &mut
925925/**
926926Write `a ^ (-1) mod n` in `res`.
927927
928- The arguments a, n and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
928+ The arguments a, n and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
929929
930930 Before calling this function, the caller will need to ensure that the following
931931 preconditions are observed.
@@ -1018,7 +1018,7 @@ pub fn mod_inv_prime_vartime(n: &[u32], a: &[u32], res: &mut [u32]) -> bool {
10181018/**
10191019Heap-allocate and initialize a montgomery context.
10201020
1021- The argument n is meant to be a 256-bit bignum, i.e. uint32_t[8] .
1021+ The argument n is meant to be a 256-bit bignum, i.e. ` uint32_t\[8\]` .
10221022
10231023 Before calling this function, the caller will need to ensure that the following
10241024 preconditions are observed.
@@ -1050,8 +1050,8 @@ pub fn mont_ctx_init(n: &[u32]) -> Box<[super::base::bn_mont_ctx_u32]> {
10501050/**
10511051Write `a mod n` in `res`.
10521052
1053- The argument a is meant to be a 512-bit bignum, i.e. uint32_t[16] .
1054- The outparam res is meant to be a 256-bit bignum, i.e. uint32_t[8] .
1053+ The argument a is meant to be a 512-bit bignum, i.e. ` uint32_t\ [16\]` .
1054+ The outparam res is meant to be a 256-bit bignum, i.e. ` uint32_t\[8\]` .
10551055 The argument k is a montgomery context obtained through Hacl_Bignum256_mont_ctx_init.
10561056*/
10571057pub fn mod_precomp ( k : & [ super :: base:: bn_mont_ctx_u32 ] , a : & [ u32 ] , res : & mut [ u32 ] ) {
@@ -1064,7 +1064,7 @@ pub fn mod_precomp(k: &[super::base::bn_mont_ctx_u32], a: &[u32], res: &mut [u32
10641064/**
10651065Write `a ^ b mod n` in `res`.
10661066
1067- The arguments a and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
1067+ The arguments a and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
10681068 The argument k is a montgomery context obtained through Hacl_Bignum256_mont_ctx_init.
10691069
10701070 The argument b is a bignum of any size, and bBits is an upper bound on the
@@ -1096,7 +1096,7 @@ pub fn mod_exp_vartime_precomp(
10961096/**
10971097Write `a ^ b mod n` in `res`.
10981098
1099- The arguments a and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
1099+ The arguments a and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
11001100 The argument k is a montgomery context obtained through Hacl_Bignum256_mont_ctx_init.
11011101
11021102 The argument b is a bignum of any size, and bBits is an upper bound on the
@@ -1128,7 +1128,7 @@ pub fn mod_exp_consttime_precomp(
11281128/**
11291129Write `a ^ (-1) mod n` in `res`.
11301130
1131- The argument a and the outparam res are meant to be 256-bit bignums, i.e. uint32_t[8] .
1131+ The argument a and the outparam res are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
11321132 The argument k is a montgomery context obtained through Hacl_Bignum256_mont_ctx_init.
11331133
11341134 Before calling this function, the caller will need to ensure that the following
@@ -1304,7 +1304,7 @@ pub fn bn_to_bytes_le(b: &[u32], res: &mut [u8]) {
13041304/**
13051305Returns 2^32 - 1 if a < b, otherwise returns 0.
13061306
1307- The arguments a and b are meant to be 256-bit bignums, i.e. uint32_t[8] .
1307+ The arguments a and b are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
13081308*/
13091309pub fn lt_mask ( a : & [ u32 ] , b : & [ u32 ] ) -> u32 {
13101310 let mut acc: [ u32 ; 1 ] = [ 0u32 ; 1usize ] ;
@@ -1319,7 +1319,7 @@ pub fn lt_mask(a: &[u32], b: &[u32]) -> u32 {
13191319/**
13201320Returns 2^32 - 1 if a = b, otherwise returns 0.
13211321
1322- The arguments a and b are meant to be 256-bit bignums, i.e. uint32_t[8] .
1322+ The arguments a and b are meant to be 256-bit bignums, i.e. ` uint32_t\[8\]` .
13231323*/
13241324pub fn eq_mask ( a : & [ u32 ] , b : & [ u32 ] ) -> u32 {
13251325 let mut mask: [ u32 ; 1 ] = [ 0xFFFFFFFFu32 ; 1usize ] ;
0 commit comments