Skip to content

Commit

Permalink
*: fix some typos
Browse files Browse the repository at this point in the history
Fixes #161.
  • Loading branch information
jtraglia authored and dot-asm committed Jul 28, 2023
1 parent 92628b7 commit 8e5ecc9
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The most-significant three bits of a G1 or G2 encoding should be masked away bef
* The third-most significant bit is set if (and only if) this point is in compressed form _and_ it is not the point at infinity _and_ its y-coordinate is the lexicographically largest of the two associated with the encoded x-coordinate.

## Build
The build process is very simple and only requires a C complier. It's integrated into the Go and Rust ecosystems, so that respective users would go about as they would with any other external module. Otherwise, a binary library would have to be compiled.
The build process is very simple and only requires a C compiler. It's integrated into the Go and Rust ecosystems, so that respective users would go about as they would with any other external module. Otherwise, a binary library would have to be compiled.

### C static library
A static library called libblst.a can be built in the current working directory of the user's choice:
Expand Down
2 changes: 1 addition & 1 deletion bindings/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ macro_rules! sig_variant_impl {
}
if sigs_groupcheck {
// We can't actually judge if input is individual or
// aggregated signature, so we can't enforce infinitiy
// aggregated signature, so we can't enforce infinity
// check.
sigs[0].validate(false)?;
}
Expand Down
2 changes: 1 addition & 1 deletion src/aggregate.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const void *blst_pairing_get_dst(const PAIRING *ctx)

/*
* Optional |nbits|-wide |scalar| is used to facilitate multiple aggregated
* signature vetification as discussed at
* signature verification as discussed at
* https://ethresear.ch/t/fast-verification-of-multiple-bls-signatures/5407.
* Usage pattern is not finalized yet, because (sig != NULL) is better and
* will be handled separately...
Expand Down
4 changes: 2 additions & 2 deletions src/asm/ct_inverse_mod_256-armv8.pl
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@
madd @acc[0], $f_, @acc[4], xzr // |u|*|f0|
madd @acc[0], $g_, @acc[5], @acc[0] // |v|*|g0|
str @acc[0], [$out_ptr,#8*4]
asr @acc[1], @acc[0], #63 // sign extenstion
asr @acc[1], @acc[0], #63 // sign extension
stp @acc[1], @acc[1], [$out_ptr,#8*5]
stp @acc[1], @acc[1], [$out_ptr,#8*7]

madd @acc[0], $f0, @acc[4], xzr // |u|*|f1|
madd @acc[0], $g0, @acc[5], @acc[0] // |v|*|g1|
str @acc[0], [$out_ptr,#8*9]
asr @acc[1], @acc[0], #63 // sign extenstion
asr @acc[1], @acc[0], #63 // sign extension
stp @acc[1], @acc[1], [$out_ptr,#8*10]
stp @acc[1], @acc[1], [$out_ptr,#8*12]
___
Expand Down
4 changes: 2 additions & 2 deletions src/asm/ct_inverse_mod_384-armv8.pl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
adds @acc[0], @acc[0], @acc[2]
adc @acc[1], @acc[1], @acc[3]
stp @acc[0], @acc[1], [$out_ptr,#8*6]
asr @acc[2], @acc[1], #63 // sign extenstion
asr @acc[2], @acc[1], #63 // sign extension
stp @acc[2], @acc[2], [$out_ptr,#8*8]
stp @acc[2], @acc[2], [$out_ptr,#8*10]

Expand All @@ -172,7 +172,7 @@
adds @acc[0], @acc[0], @acc[2]
adc @acc[1], @acc[1], @acc[3]
stp @acc[0], @acc[1], [$out_ptr,#8*12]
asr @acc[2], @acc[1], #63 // sign extenstion
asr @acc[2], @acc[1], #63 // sign extension
stp @acc[2], @acc[2], [$out_ptr,#8*14]
stp @acc[2], @acc[2], [$out_ptr,#8*16]
___
Expand Down
2 changes: 1 addition & 1 deletion src/asm/div3w-armv8.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
asr x3,x0,#63 // top bit -> mask
add x0,x0,x0 // Q <<= 1
subs x6,x4,x1 // R - D
add x0,x0,#1 // Q + specilative bit
add x0,x0,#1 // Q + speculative bit
sbcs x7,x5,x2
sbc x0,x0,xzr // subtract speculative bit

Expand Down
2 changes: 1 addition & 1 deletion src/asm/sha256-armv8.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# sha256_block procedure for ARMv8.
#
# This module is stripped of scalar code paths, with raionale that all
# This module is stripped of scalar code paths, with rationale that all
# known processors are NEON-capable.
#
# See original module at CRYPTOGAMS for further details.
Expand Down
4 changes: 2 additions & 2 deletions src/asm/sha256-x86_64.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
# sha256_block procedure for x86_64.
#
# This module is stripped of AVX and even scalar code paths, with
# raionale that
# rationale that
#
# a) AVX1 is [justifiably] faster than SSSE3 code path only on *one*
# processor, venerable Sandy Bridge;
# b) AVX2 incurs costly power transitions, which would be justifiable
# if AVX2 code was executing most of the time, which is not the
# case in the context;
# c) all comtemporary processors support SSSE3, so that nobody would
# c) all contemporary processors support SSSE3, so that nobody would
# actually use scalar code path anyway;
#
# See original module at CRYPTOGAMS for further details.
Expand Down
4 changes: 2 additions & 2 deletions src/bytes.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static inline void limbs_from_be_bytes(limb_t *restrict ret,
* 'if (n % sizeof(limb_t) == 0)' is omitted because it's cheaper
* to perform redundant stores than to pay penalty for
* mispredicted branch. Besides, some compilers unroll the
* loop and remove redundant stores to 'restict'-ed storage...
* loop and remove redundant stores to 'restrict'-ed storage...
*/
ret[n / sizeof(limb_t)] = limb;
}
Expand Down Expand Up @@ -55,7 +55,7 @@ static inline void limbs_from_le_bytes(limb_t *restrict ret,
* 'if (n % sizeof(limb_t) == 0)' is omitted because it's cheaper
* to perform redundant stores than to pay penalty for
* mispredicted branch. Besides, some compilers unroll the
* loop and remove redundant stores to 'restict'-ed storage...
* loop and remove redundant stores to 'restrict'-ed storage...
*/
ret[n / sizeof(limb_t)] = limb;
}
Expand Down
8 changes: 4 additions & 4 deletions src/e1.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void blst_p1_affine_serialize(unsigned char out[96],
{
if (vec_is_zero(in->X, 2*sizeof(in->X))) {
bytes_zero(out, 96);
out[0] = 0x40; /* infinitiy bit */
out[0] = 0x40; /* infinity bit */
} else {
(void)POINTonE1_affine_Serialize_BE(out, in);
}
Expand All @@ -178,7 +178,7 @@ static void POINTonE1_Serialize(unsigned char out[96], const POINTonE1 *in)
{
if (vec_is_zero(in->Z, sizeof(in->Z))) {
bytes_zero(out, 96);
out[0] = 0x40; /* infinitiy bit */
out[0] = 0x40; /* infinity bit */
} else {
(void)POINTonE1_Serialize_BE(out, in);
}
Expand All @@ -202,7 +202,7 @@ void blst_p1_affine_compress(unsigned char out[48], const POINTonE1_affine *in)
{
if (vec_is_zero(in->X, 2*sizeof(in->X))) {
bytes_zero(out, 48);
out[0] = 0xc0; /* compressed and infinitiy bits */
out[0] = 0xc0; /* compressed and infinity bits */
} else {
limb_t sign = POINTonE1_affine_Compress_BE(out, in);
out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4));
Expand All @@ -226,7 +226,7 @@ void blst_p1_compress(unsigned char out[48], const POINTonE1 *in)
{
if (vec_is_zero(in->Z, sizeof(in->Z))) {
bytes_zero(out, 48);
out[0] = 0xc0; /* compressed and infinitiy bits */
out[0] = 0xc0; /* compressed and infinity bits */
} else {
limb_t sign = POINTonE1_Compress_BE(out, in);
out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4));
Expand Down
8 changes: 4 additions & 4 deletions src/e2.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void blst_p2_affine_serialize(unsigned char out[192],
{
if (vec_is_zero(in->X, 2*sizeof(in->X))) {
bytes_zero(out, 192);
out[0] = 0x40; /* infinitiy bit */
out[0] = 0x40; /* infinity bit */
} else {
(void)POINTonE2_affine_Serialize_BE(out, in);
}
Expand All @@ -219,7 +219,7 @@ static void POINTonE2_Serialize(unsigned char out[192], const POINTonE2 *in)
{
if (vec_is_zero(in->Z, sizeof(in->Z))) {
bytes_zero(out, 192);
out[0] = 0x40; /* infinitiy bit */
out[0] = 0x40; /* infinity bit */
} else {
(void)POINTonE2_Serialize_BE(out, in);
}
Expand All @@ -245,7 +245,7 @@ void blst_p2_affine_compress(unsigned char out[96], const POINTonE2_affine *in)
{
if (vec_is_zero(in->X, 2*sizeof(in->X))) {
bytes_zero(out, 96);
out[0] = 0xc0; /* compressed and infinitiy bits */
out[0] = 0xc0; /* compressed and infinity bits */
} else {
limb_t sign = POINTonE2_affine_Compress_BE(out, in);
out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4));
Expand All @@ -269,7 +269,7 @@ void blst_p2_compress(unsigned char out[96], const POINTonE2 *in)
{
if (vec_is_zero(in->Z, sizeof(in->Z))) {
bytes_zero(out, 96);
out[0] = 0xc0; /* compressed and infinitiy bits */
out[0] = 0xc0; /* compressed and infinity bits */
} else {
limb_t sign = POINTonE2_Compress_BE(out, in);
out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4));
Expand Down
2 changes: 1 addition & 1 deletion src/ec_mult.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static limb_t booth_encode(limb_t wval, size_t sz)
* pass order's bit-length, which is customarily publicly known, instead
* of the factual scalars' bit-lengths. This is facilitated by point
* addition subroutines implemented to handle points at infinity, which
* are encoded as Z==0. [Doubling agorithms handle such points at
* are encoded as Z==0. [Doubling algorithms handle such points at
* infinity "naturally," since resulting Z is product of original Z.]
*/
#define POINT_MULT_SCALAR_WX_IMPL(ptype, SZ) \
Expand Down
2 changes: 1 addition & 1 deletion src/exports.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void blst_fp2_cneg(vec384x ret, const vec384x a, int flag)
{ cneg_fp2(ret, a, is_zero(flag) ^ 1); }

/*
* Scalar serialization/deseriazation.
* Scalar serialization/deserialization.
*/
void blst_scalar_from_uint32(pow256 ret, const unsigned int a[8])
{
Expand Down
2 changes: 1 addition & 1 deletion src/vect.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ typedef unsigned char byte;
typedef byte pow256[256/8];

/*
* Internal Boolean type, Bolean by value, hence safe to cast to or
* Internal Boolean type, Boolean by value, hence safe to cast to or
* reinterpret as 'bool'.
*/
typedef limb_t bool_t;
Expand Down

0 comments on commit 8e5ecc9

Please sign in to comment.