# MPCL API Documentation

## Packages

Package aes implements the Advanced Encryption Standard (AES)
block cipher operations.

Package binary implements functions for processing binary data.

Package bits implements bit manipulation functions for predefined
unsigned integer types.

Package builtin defines MPCL built-in functions and types.

Package bytes implements functions for byte slice manipulation.

Package cbc implements the cipher block chaining (CBC) mode of
operation for block ciphers.

Package cts implements the ciphertext stealing (CTS) mode of
operation for block ciphers.

Package curve25519 provides an implementation of scalar multiplication on
the elliptic curve known as curve25519.

Package ed25519 implements the Ed25519 signature algorithm.

Package gcm implements the Galois/Counter Mode of Operation (GCM)
for block ciphers.

Package hex implements hexadecimal encoding and decoding functions.

Package hmac implements Keyed-Hash Message Authentication Code
(HMAC) functions.

Package math implements various mathematical algorithms and
provides commonly used constant values.

Package rsa implements RSA encrypt and decrypt operations.

Package sha1 implements the SHA-1 hash algorithm as defined in RFC 3174.

Package sha256 implements the he SHA-224 and SHA-256 cryptographic
hash functions.

Package sha512 implements the SHA-384, SHA-512, SHA-512/224, and
SHA-512/256 cryptographic hash functions.

Package sort implements array sorting functions.

## Programs

Sample 3-party circuit where each party provides their input bit
and the result is bitwise AND of the inputs.

This example implements Ed25519 key generation.

This example implements Ed25519 signature computation.

Example how to encrypt fixed sized data with AES-128-GCM.

This example computes HMAC-SHA256 where the HMAC key is shared as
two random shares between garbler and evaluator.

This example shows how a key can be imported to MCP peers garbler
and evaluator so that after the import operation both peers hold a
random share of the key, and shareG^shareE=key.

Yao's Millionaires' problem with int64 values.

RSA encryption with Montgomery modular multiplication.

32-bit RSA encryption and decryption.

RSA signature with Size bits.