pic32cx_bz_crypto_pkc.c
error_t rsadp(const RsaPrivateKey *key, const Mpi *c, Mpi *m)
RSA decryption primitive.
Definition: pic32cx_bz_crypto_pkc.c:725
PIC32CX BZ2 public-key hardware accelerator (PUKCC)
ZpEcPointIsOnCurve service parameters.
Definition: pic32cx_bz_crypto_pkc.h:163
ECDSA (Elliptic Curve Digital Signature Algorithm)
uint8_t * pukccImportArray(uint8_t **dest, const uint8_t *array, size_t arrayLen, size_t totalLen)
Import byte array.
Definition: pic32cx_bz_crypto_pkc.c:101
error_t ecMult(const EcDomainParameters *ecParams, EcPoint *r, const Mpi *d, const EcPoint *s)
Scalar multiplication.
Definition: pic32cx_bz_crypto_pkc.c:1064
error_t mpiRandRange(Mpi *r, const Mpi *p, const PrngAlgo *prngAlgo, void *prngContext)
Generate a random value in the range 1 to p-1.
Definition: mpi.c:564
error_t mpiInvMod(Mpi *r, const Mpi *a, const Mpi *p)
Modular inverse.
Definition: pic32cx_bz_crypto_pkc.c:356
error_t mpiImport(Mpi *r, const uint8_t *data, uint_t length, MpiFormat format)
Octet string to integer conversion.
Definition: mpi.c:624
uint8_t * pukccWorkspace(uint8_t **dest, size_t totalLen)
Initialize workspace area.
Definition: pic32cx_bz_crypto_pkc.c:163
bool_t ecIsPointAffine(const EcDomainParameters *ecParams, const EcPoint *s)
Check whether the affine point S is on the curve.
Definition: pic32cx_bz_crypto_pkc.c:855
error_t mpiExport(const Mpi *a, uint8_t *data, uint_t length, MpiFormat format)
Integer to octet string conversion.
Definition: mpi.c:709
ZpEcConvProjToAffine service parameters.
Definition: pic32cx_bz_crypto_pkc.h:180
MPI (Multiple Precision Integer Arithmetic)
General definitions for cryptographic algorithms.
RSA public-key cryptography standard.
error_t mpiMul(Mpi *r, const Mpi *a, const Mpi *b)
Multiple precision multiplication.
Definition: pic32cx_bz_crypto_pkc.c:193
error_t mpiExpMod(Mpi *r, const Mpi *a, const Mpi *e, const Mpi *p)
Modular exponentiation.
Definition: pic32cx_bz_crypto_pkc.c:431
error_t ecAffinify(const EcDomainParameters *ecParams, EcPoint *r, const EcPoint *s)
Recover affine representation.
Definition: pic32cx_bz_crypto_pkc.c:954
error_t ecdsaGenerateSignature(const PrngAlgo *prngAlgo, void *prngContext, const EcDomainParameters *ecParams, const EcPrivateKey *privateKey, const uint8_t *digest, size_t digestLen, EcdsaSignature *signature)
ECDSA signature generation.
Definition: pic32cx_bz_crypto_pkc.c:1192
PIC32CX BZ2 hardware cryptographic accelerator.
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
Definition: os_port_chibios.c:396
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
Definition: os_port_chibios.c:408
error_t ecdsaVerifySignature(const EcDomainParameters *ecParams, const EcPublicKey *publicKey, const uint8_t *digest, size_t digestLen, const EcdsaSignature *signature)
ECDSA signature verification.
Definition: pic32cx_bz_crypto_pkc.c:1353
ZpEcDsaGenerate service parameters.
Definition: pic32cx_bz_crypto_pkc.h:213
error_t mpiMod2(Mpi *r, const Mpi *a, const Mpi *p)
Modulo operation.
Definition: pic32cx_bz_crypto_pkc.c:281
int_t mpiComp(const Mpi *a, const Mpi *b)
Compare two multiple precision integers.
Definition: mpi.c:338
ECC (Elliptic Curve Cryptography)
int_t mpiCompInt(const Mpi *a, int_t b)
Compare a multiple precision integer with an integer.
Definition: mpi.c:382
uint8_t * pukccImportMpi(uint8_t **dest, const Mpi *src, size_t totalLen)
Import multiple-precision integer.
Definition: pic32cx_bz_crypto_pkc.c:138
Debugging facilities.
error_t mpiCheckProbablePrime(const Mpi *a)
Test whether a number is probable prime.
Definition: pic32cx_bz_crypto_pkc.c:581