1 MPLAB® Harmony 3 Crypto Library

The Cryptographic Library includes functions to perform encryption, decryption, hashing, authentication, and compression within the embedded application. Random Number Generation (RNG) functions are also provided.

Block Ciphers

The library provides DES, 3DES, and AES for block cipher needs. Depending on the algorithm in use, CBC and CTR modes are supported.

Public Key Cryptography

The library provides RSA and Elliptic Curve Cryptography (ECC) for Public Key Cryptography, and Diffie-Hellman (DH) for key agreement arrangements.

Hash Functions

The library provides MD5, SHA, SHA-256, SHA-384, and SHA-512 for hashing. These functions do not require keys or Initialization Vectors (IV).

Random Number Generation Functions

The library provides functions to generate either a single pseudo-random number, or a block of such numbers.

Library Interface

The Library Interface routines are divided into various sub-sections, which address one of the blocks or the overall operation of the Cryptographic (Crypto) Library module.

Library Interface SectionDescription
General FunctionsProvides an error string function, which takes an error and converts it into human-readable text
Compression FunctionsProvides Huffman compression and decompression functions
MD5 FunctionsProvides data add, finalize, and initialize MD5 functions
Random Number Generator FunctionsProvides get, initialize, and block generate RNG functions
AES Encryption/Decryption FunctionsProvides AES encryption and decryption functions
ECC Encryption/Decryption FunctionsProvides ECC encryption and decryption functions
RSA Encryption/Decryption FunctionsProvides RSA encryption and decryption functions
Triple DES Encryption/Decryption FunctionsProvides 3DES encryption and decryption functions
HMAC Hash FunctionsProvides HMAC data add, finalize, and set key Hash functions
SHA Hash FunctionsProvides SHA data add, finalize, and initialize Hash functions
SHA256 Hash FunctionsProvides SHA256 data add, finalize, and initialize Hash functions
SHA384 Hash FunctionsProvides SHA384 data add, finalize, and initialize Hash functions
SHA512 Hash FunctionsProvides SHA512 data add, finalize, and initialize Hash functions