samd51_crypto_pkc.c
bool_t ecIsPointAffine(const EcDomainParameters *ecParams, const EcPoint *s)
Check whether the affine point S is on the curve.
Definition: samd51_crypto_pkc.c:855
ZpEcPointIsOnCurve service parameters.
Definition: pic32cx_bz_crypto_pkc.h:163
uint8_t * pukccImportArray(uint8_t **dest, const uint8_t *array, size_t arrayLen, size_t totalLen)
Import byte array.
Definition: samd51_crypto_pkc.c:101
SAMD51 public-key hardware accelerator (PUKCC)
ECDSA (Elliptic Curve Digital Signature Algorithm)
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: samd51_crypto_pkc.c:1192
error_t mpiInvMod(Mpi *r, const Mpi *a, const Mpi *p)
Modular inverse.
Definition: samd51_crypto_pkc.c:356
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 mpiMod2(Mpi *r, const Mpi *a, const Mpi *p)
Modulo operation.
Definition: samd51_crypto_pkc.c:281
error_t mpiImport(Mpi *r, const uint8_t *data, uint_t length, MpiFormat format)
Octet string to integer conversion.
Definition: mpi.c:624
error_t mpiMul(Mpi *r, const Mpi *a, const Mpi *b)
Multiple precision multiplication.
Definition: samd51_crypto_pkc.c:193
uint8_t * pukccImportMpi(uint8_t **dest, const Mpi *src, size_t totalLen)
Import multiple-precision integer.
Definition: samd51_crypto_pkc.c:138
error_t mpiExport(const Mpi *a, uint8_t *data, uint_t length, MpiFormat format)
Integer to octet string conversion.
Definition: mpi.c:709
error_t ecdsaVerifySignature(const EcDomainParameters *ecParams, const EcPublicKey *publicKey, const uint8_t *digest, size_t digestLen, const EcdsaSignature *signature)
ECDSA signature verification.
Definition: samd51_crypto_pkc.c:1353
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 ecMult(const EcDomainParameters *ecParams, EcPoint *r, const Mpi *d, const EcPoint *s)
Scalar multiplication.
Definition: samd51_crypto_pkc.c:1064
uint8_t * pukccWorkspace(uint8_t **dest, size_t totalLen)
Initialize workspace area.
Definition: samd51_crypto_pkc.c:163
error_t mpiCheckProbablePrime(const Mpi *a)
Test whether a number is probable prime.
Definition: samd51_crypto_pkc.c:581
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 ecAffinify(const EcDomainParameters *ecParams, EcPoint *r, const EcPoint *s)
Recover affine representation.
Definition: samd51_crypto_pkc.c:954
ZpEcDsaGenerate service parameters.
Definition: pic32cx_bz_crypto_pkc.h:213
int_t mpiComp(const Mpi *a, const Mpi *b)
Compare two multiple precision integers.
Definition: mpi.c:338
error_t rsadp(const RsaPrivateKey *key, const Mpi *c, Mpi *m)
RSA decryption primitive.
Definition: samd51_crypto_pkc.c:725
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
SAMD51 hardware cryptographic accelerator.
Debugging facilities.
error_t mpiExpMod(Mpi *r, const Mpi *a, const Mpi *e, const Mpi *p)
Modular exponentiation.
Definition: samd51_crypto_pkc.c:431