|
cryptnox-sdk-arduino 1.0.0
Arduino library for Cryptnox Hardware Wallet
|
Public Member Functions | |
| bool | sha256 (const uint8_t *, size_t, uint8_t *) override |
| Compute SHA-256 over a contiguous data buffer. | |
| bool | sha512 (const uint8_t *, size_t, uint8_t *) override |
| Compute SHA-512 over a contiguous data buffer. | |
| uint16_t | aesCbcEncrypt (const uint8_t *, uint16_t, uint8_t *, const uint8_t *, uint8_t, uint8_t *, bool) override |
| AES-CBC encrypt. | |
| uint16_t | aesCbcDecrypt (uint8_t *, uint16_t, uint8_t *, const uint8_t *, uint8_t, uint8_t *, bool) override |
| AES-CBC decrypt. | |
| bool | ecdh (const uint8_t *, const uint8_t *, uint8_t *, CW_Curve) override |
| ECDH shared secret computation. | |
| bool | makeKey (uint8_t *, uint8_t *, CW_Curve) override |
| Generate a new EC key pair. | |
| bool | random (uint8_t *, unsigned) override |
| Fill a buffer with cryptographically random bytes. | |
| bool | ecdsaVerify (const uint8_t *, const uint8_t *, size_t, const uint8_t *, CW_Curve) override |
| Verify an ECDSA signature (raw r||s, 64 bytes) against a message hash. | |
| Public Member Functions inherited from CW_CryptoProvider | |
| virtual | ~CW_CryptoProvider () |
Definition at line 82 of file fuzz_der.cpp.
|
inlineoverridevirtual |
AES-CBC decrypt.
| [in] | in | Ciphertext input buffer (non-const; may be modified internally). |
| [in] | len | Length of the ciphertext. |
| [out] | out | Plaintext output buffer. |
| [in] | key | AES key bytes. |
| [in] | keyLen | AES key length in bytes. |
| [in,out] | iv | 16-byte IV used as decrypt IV. |
| [in] | bitPadding | true = Bit padding removal; false = Null padding (no removal). |
out. Implements CW_CryptoProvider.
Definition at line 89 of file fuzz_der.cpp.
|
inlineoverridevirtual |
AES-CBC encrypt.
| [in] | in | Plaintext input buffer. |
| [in] | len | Length of the plaintext. |
| [out] | out | Ciphertext output buffer (must be large enough for padding). |
| [in] | key | AES key bytes. |
| [in] | keyLen | AES key length in bytes (16, 24, or 32). |
| [in,out] | iv | 16-byte IV; updated to last cipher block on return. |
| [in] | bitPadding | true = ISO/IEC 9797-1 Method 2 (Bit) padding; false = Null padding (no padding added). |
out. Implements CW_CryptoProvider.
Definition at line 86 of file fuzz_der.cpp.
|
inlineoverridevirtual |
ECDH shared secret computation.
| [in] | pubKey | Remote public key (64 bytes, X||Y, no 0x04 prefix). |
| [in] | privKey | Local private key (32 bytes). |
| [out] | secret | 32-byte shared secret output. |
| [in] | curve | Curve identifier (CW_CURVE_SECP256R1 or CW_CURVE_SECP256K1). |
Implements CW_CryptoProvider.
Definition at line 92 of file fuzz_der.cpp.
|
inlineoverridevirtual |
Verify an ECDSA signature (raw r||s, 64 bytes) against a message hash.
| [in] | pubKey64 | 64-byte public key (X||Y, no 0x04 prefix). |
| [in] | hash | Message hash buffer. |
| [in] | hashLen | Length of the hash in bytes. |
| [in] | sig | 64-byte raw signature (r[32]||s[32]). |
| [in] | curve | Curve identifier for the verification operation. |
Implements CW_CryptoProvider.
Definition at line 97 of file fuzz_der.cpp.
|
inlineoverridevirtual |
Generate a new EC key pair.
| [out] | pubKey | 64-byte public key output (X||Y, no prefix). |
| [out] | privKey | 32-byte private key output. |
| [in] | curve | Curve identifier (CW_CURVE_SECP256R1 or CW_CURVE_SECP256K1). |
Implements CW_CryptoProvider.
Definition at line 94 of file fuzz_der.cpp.
|
inlineoverridevirtual |
Fill a buffer with cryptographically random bytes.
| [out] | dest | Buffer to fill. |
| [in] | size | Number of bytes to generate. |
Implements CW_CryptoProvider.
Definition at line 96 of file fuzz_der.cpp.
|
inlineoverridevirtual |
Compute SHA-256 over a contiguous data buffer.
| [in] | data | Input buffer. |
| [in] | len | Number of bytes to hash. |
| [out] | out | 32-byte output buffer. |
Implements CW_CryptoProvider.
Definition at line 84 of file fuzz_der.cpp.
|
inlineoverridevirtual |
Compute SHA-512 over a contiguous data buffer.
| [in] | data | Input buffer. |
| [in] | len | Number of bytes to hash. |
| [out] | out | 64-byte output buffer. |
Implements CW_CryptoProvider.
Definition at line 85 of file fuzz_der.cpp.