|
SharkSSL™ Embedded SSL/TLS Stack
|
Cryptographic functions, including RSA, ECC, AES, hashing, etc..
RayCrypto offers developers a rich selection of cryptographic technologies, methods including RSA and elliptic curve, symmetric algorithms like 3DES and AES, message authentication, hashing and pseudorandom number generation.
Modules | |
| MD5 | |
| MD5 cryptographic hash. | |
| SHA1 | |
| SHA1 cryptographic hash. | |
| SHA256 | |
| SHA256 cryptographic hash. | |
| SHA384 | |
| SHA384 cryptographic hash. | |
| SHA512 | |
| SHA512 cryptographic hash. | |
| HMAC | |
| HMAC keyed-hash message authentication code (in conjunction with: MD5,SHA1,SHA256,SHA384,SHA512) | |
| ARC4 | |
| ARC4. | |
| DES | |
| DES. | |
| AES | |
| AES. | |
| AES-GCM | |
| AES-GCM. | |
| AES-CCM | |
| AES-CCM. | |
| POLY1305 | |
| POLY1305. | |
| CHACHA20 | |
| CHACHA20. | |
| ECDSA sign/verify functions | |
| See Signing and Verifying Binaries for an example of how to use the ECDSA ECDSA sign/verify functions. | |
| RSA encrypt/decrypt functions | |
Functions | |
| SHARKSSL_API sharkssl_PEM_RetVal | sharkssl_PEM (const char *certPEM, const char *keyPEM, const char *passphrase, SharkSslCert *sharkSslCert) |
| Create a SharkSslCert certificate by using a certificate and key in PEM format. More... | |
| SHARKSSL_API int | sharkssl_PEM_PBKDF2 (U8 *dk, const char *passphrase, const char *salt, U32 saltLen, U32 iterations, U16 dkLen, U8 hashID) |
| sharkssl_PEM_PBKDF2 (output, passphrase, salt, salt_len, iterations, dkLen, hashID) Derives a key from a passphrase using the PBKDF2 algorithm as specified in RFC 8018 section 5.2. More... | |
| enum sharkssl_PEM_RetVal |
Return values from function sharkssl_PEM.
| SHARKSSL_API sharkssl_PEM_RetVal sharkssl_PEM | ( | const char * | certPEM, |
| const char * | keyPEM, | ||
| const char * | passphrase, | ||
| SharkSslCert * | sharkSslCert | ||
| ) |
Create a SharkSslCert certificate by using a certificate and key in PEM format.
example:
| SHARKSSL_API int sharkssl_PEM_PBKDF2 | ( | U8 * | dk, |
| const char * | passphrase, | ||
| const char * | salt, | ||
| U32 | saltLen, | ||
| U32 | iterations, | ||
| U16 | dkLen, | ||
| U8 | hashID | ||
| ) |
sharkssl_PEM_PBKDF2 (output, passphrase, salt, salt_len, iterations, dkLen, hashID) Derives a key from a passphrase using the PBKDF2 algorithm as specified in RFC 8018 section 5.2.
This function performs the Password-Based Key Derivation Function 2 (PBKDF2) to derive a key from a given passphrase. The derived key is computed by iterating the specified hash function over the passphrase and salt.
| dk | pointer to the buffer where the derived key will be stored |
| passphrase | pointer to the passphrase (null-terminated string) used to derive the key |
| salt | pointer to the salt string used in the key derivation process |
| saltLen | length of the salt in bytes |
| iterations | number of iterations to perform in the key derivation process |
| dkLen | desired length of the derived key in bytes. |
| hashID | identifier for the digest function to use; allowed values are: SHARKSSL_HASHID_SHA512, SHARKSSL_HASHID_SHA384, SHARKSSL_HASHID_SHA256 |