Skip to content

Commit 7446283

Browse files
committed
docs: minor improvements
1 parent 06ce5e7 commit 7446283

File tree

9 files changed

+19
-17
lines changed

9 files changed

+19
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $ brew install swig
6161
### configure options
6262

6363
- `--enable-debug`. Enables debugging information and disables compiler
64-
optimisations (default: no).
64+
optimizations (default: no).
6565
- `--enable-minimal`. Minimises library size and memory requirements to target
6666
embedded or resource-constrained environments (default: no).
6767
- `--enable-asm`. Enables fast assembly language implementations where available.

include/wally_crypto.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ WALLY_CORE_API int wally_scrypt(
4949
/**
5050
* Get the length of encrypted/decrypted data using AES (ECB mode, no padding).
5151
*
52-
* :param key: Key material for initialisation.
52+
* :param key: Encryption/decryption key.
5353
* :param key_len: Length of ``key`` in bytes. Must be one of the :ref:`aes-key-length`.
5454
* :param bytes: Bytes to encrypt/decrypt.
5555
* :param bytes_len: Length of ``bytes`` in bytes. Must be a multiple of `AES_BLOCK_LEN`.
@@ -69,7 +69,7 @@ WALLY_CORE_API int wally_aes_len(
6969
/**
7070
* Encrypt/decrypt data using AES (ECB mode, no padding).
7171
*
72-
* :param key: Key material for initialisation.
72+
* :param key: Encryption/decryption key.
7373
* :param key_len: Length of ``key`` in bytes. Must be one of the :ref:`aes-key-length`.
7474
* :param bytes: Bytes to encrypt/decrypt.
7575
* :param bytes_len: Length of ``bytes`` in bytes. Must be a multiple of `AES_BLOCK_LEN`.
@@ -89,9 +89,10 @@ WALLY_CORE_API int wally_aes(
8989
/**
9090
* Get the maximum length of encrypted/decrypted data using AES (CBC mode, PKCS#7 padding).
9191
*
92-
* :param key: Key material for initialisation.
92+
* :param key: Encryption/decryption key.
9393
* :param key_len: Length of ``key`` in bytes. Must be one of the :ref:`aes-key-length`.
94-
* :param iv: Initialisation vector.
94+
* :param iv: Initialization vector. For encryption this should be secure entropy. For
95+
*| decryption the bytes used when encrypting must be given.
9596
* :param iv_len: Length of ``iv`` in bytes. Must be `AES_BLOCK_LEN`.
9697
* :param bytes: Bytes to encrypt/decrypt.
9798
* :param bytes_len: Length of ``bytes`` in bytes. Can be of any length for encryption, must be a multiple of `AES_BLOCK_LEN` for decryption.
@@ -111,9 +112,10 @@ WALLY_CORE_API int wally_aes_cbc_get_maximum_length(
111112
/**
112113
* Encrypt/decrypt data using AES (CBC mode, PKCS#7 padding).
113114
*
114-
* :param key: Key material for initialisation.
115+
* :param key: Encryption/decryption key.
115116
* :param key_len: Length of ``key`` in bytes. Must be one of the :ref:`aes-key-length`.
116-
* :param iv: Initialisation vector.
117+
* :param iv: Initialization vector. For encryption this should be secure entropy. For
118+
*| decryption the bytes used when encrypting must be given.
117119
* :param iv_len: Length of ``iv`` in bytes. Must be `AES_BLOCK_LEN`.
118120
* :param bytes: Bytes to encrypt/decrypt.
119121
* :param bytes_len: Length of ``bytes`` in bytes. Can be of any length for encryption, must be a multiple of `AES_BLOCK_LEN` for decryption.
@@ -896,7 +898,7 @@ WALLY_CORE_API int wally_s2c_commitment_verify(
896898
*
897899
* :param priv_key: The callers private key used for Diffie-Helman exchange.
898900
* :param priv_key_len: The length of ``priv_key`` in bytes. Must be `EC_PRIVATE_KEY_LEN`.
899-
* :param iv: Initialisation vector. Only required when encrypting, otherwise pass NULL.
901+
* :param iv: Initialization vector. Only required when encrypting, otherwise pass NULL.
900902
* :param iv_len: Length of ``iv`` in bytes. Must be `AES_BLOCK_LEN`.
901903
* :param bytes: Bytes to encrypt/decrypt.
902904
* :param bytes_len: Length of ``bytes`` in bytes.
@@ -927,7 +929,7 @@ WALLY_CORE_API int wally_aes_cbc_with_ecdh_key_get_maximum_length(
927929
*
928930
* :param priv_key: The callers private key used for Diffie-Helman exchange.
929931
* :param priv_key_len: The length of ``priv_key`` in bytes. Must be `EC_PRIVATE_KEY_LEN`.
930-
* :param iv: Initialisation vector. Only required when encrypting, otherwise pass NULL.
932+
* :param iv: Initialization vector. Only required when encrypting, otherwise pass NULL.
931933
* :param iv_len: Length of ``iv`` in bytes. Must be `AES_BLOCK_LEN` if encrypting otherwise 0.
932934
* :param bytes: Bytes to encrypt/decrypt.
933935
* :param bytes_len: Length of ``bytes`` in bytes.

include/wally_transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extern "C" {
2626
#define WALLY_TX_FLAG_ALLOW_PARTIAL 0x4 /* Allow partially complete transactions */
2727
/* Note: This flag encodes/parses transactions that are ambiguous to decode.
2828
Unless you have a good reason to do so you will most likely not need it */
29-
#define WALLY_TX_FLAG_PRE_BIP144 0x8 /* Encode/Decode using pre-BIP 144 serialisation */
29+
#define WALLY_TX_FLAG_PRE_BIP144 0x8 /* Encode/Decode using pre-BIP 144 serialization */
3030

3131
#define WALLY_TX_FLAG_BLINDED_INITIAL_ISSUANCE 0x1
3232

src/coins.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ typedef struct value_remaining {
5353
* the io_ratio passed in, which increases the search space and prefers to
5454
* use more inputs if a changeless solution is found.
5555
*
56-
* We implement the core optimisations:
56+
* We implement the core optimizations:
5757
* - Cut the search branch when it cannot reach the target
5858
* - Cut the search branch when it exceeds the target (after scoring it)
5959
* - Do not test equivalent combinations
6060
*
61-
* We add two additional optimisations. First, we return immediately if we find
61+
* We add two additional optimizations. First, we return immediately if we find
6262
* a single input exact match, since that represents the best match possible.
6363
* Second, we cut the search branch when the number of selected inputs
6464
* is enough that even an exact match would not score better than the current

src/ctest/test_clear.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extern void __asan_unpoison_memory_region(void const volatile *addr, size_t size
3636
* determine that the memory is not read afterwards. There are reports
3737
* that tricks designed to work around this including making data volatile,
3838
* calling through function pointers, dummy asm contraints etc are
39-
* not always effective as optimisation continues to improve.
39+
* not always effective as optimization continues to improve.
4040
*
4141
* Here we try to ensure that the wally_clear/wally_clear_n() functions work as advertised
4242
* by:

src/swig_java/src/com/blockstream/test/test_bip32.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void test() {
4848
final byte[] initSerialized = Wally.bip32_key_serialize(initKey, BIP32_FLAG_KEY_PRIVATE);
4949

5050
if (!h(initSerialized).equals(h(derivedSerialized)))
51-
throw new RuntimeException("BIP32 initialisation by member failed");
51+
throw new RuntimeException("BIP32 initialization by member failed");
5252

5353
final byte[] message = Wally.bip32_key_get_chain_code(derivedKey);
5454
final byte[] signature = Wally.ec_sig_from_bytes(Wally.bip32_key_get_priv_key(derivedKey),

src/transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2794,7 +2794,7 @@ static int analyze_tx(const unsigned char *bytes, size_t bytes_len,
27942794

27952795
if (is_elements) {
27962796
if (flags & WALLY_TX_FLAG_PRE_BIP144)
2797-
return WALLY_EINVAL; /* No pre-BIP 144 serialisation for elements */
2797+
return WALLY_EINVAL; /* No pre-BIP 144 serialization for elements */
27982798
*expect_witnesses = *p++ != 0;
27992799
} else {
28002800
if (!(flags & WALLY_TX_FLAG_PRE_BIP144) && *p == 0) {

src/wasm_package/src/const.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export const WALLY_TX_DUMMY_SIG = 0x2; /* A dummy signature */
228228
export const WALLY_TX_DUMMY_SIG_LOW_R = 0x4; /* A dummy signature created with EC_FLAG_GRIND_R */
229229
export const WALLY_TX_FLAG_ALLOW_PARTIAL = 0x4; /* Allow partially complete transactions */
230230
export const WALLY_TX_FLAG_BLINDED_INITIAL_ISSUANCE = 0x1;
231-
export const WALLY_TX_FLAG_PRE_BIP144 = 0x8; /* Encode/Decode using pre-BIP 144 serialisation */
231+
export const WALLY_TX_FLAG_PRE_BIP144 = 0x8; /* Encode/Decode using pre-BIP 144 serialization */
232232
export const WALLY_TX_FLAG_USE_ELEMENTS = 0x2; /* Encode/Decode as an elements transaction */
233233
export const WALLY_TX_FLAG_USE_WITNESS = 0x1; /* Encode witness data if present */
234234
export const WALLY_TX_INDEX_MASK = 0x3fffffff;

src/wasm_package/test/bip32.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ test('BIP32 derivation', () => {
109109
const derivedSerialized = wally.bip32_key_serialize(derivedKey, wally.BIP32_FLAG_KEY_PRIVATE)
110110
const initSerialized = wally.bip32_key_serialize(initKey, wally.BIP32_FLAG_KEY_PRIVATE)
111111

112-
assert.deepEqual(initSerialized, derivedSerialized, 'BIP32 initialisation by member failed')
112+
assert.deepEqual(initSerialized, derivedSerialized, 'BIP32 initialization by member failed')
113113

114114
wally.bip32_key_free(seedKey)
115115
wally.bip32_key_free(derivedKey)

0 commit comments

Comments
 (0)