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