Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MiniTLS-HTTPS-Example
ltc.h File Reference
Copyright (c) AppNearMe Ltd 2013 More...
Go to the source code of this file.
Functions | |
| ecc_point * | ltc_ecc_new_point (void) |
| Allocate a new ECC point. | |
| void | ltc_ecc_del_point (ecc_point *p) |
| Free an ECC point from memory. | |
| int | ltc_ecc_projective_dbl_point (ecc_point *P, ecc_point *R, void *modulus, void *mp) |
| Double an ECC point. | |
| int | ltc_ecc_projective_add_point (ecc_point *P, ecc_point *Q, ecc_point *R, void *modulus, void *mp) |
| Add two ECC points. | |
| int | ltc_ecc_mulmod (void *k, ecc_point *G, ecc_point *R, void *modulus, int map) |
| Perform a point multiplication (timing resistant) | |
| int | ltc_ecc_mul2add (ecc_point *A, void *kA, ecc_point *B, void *kB, ecc_point *C, void *modulus) |
| Computes kA*A + kB*B = C using Shamir's Trick. | |
| int | ltc_ecc_map (ecc_point *P, void *modulus, void *mp) |
| Map a projective jacbobian point back to affine space. | |
Detailed Description
Copyright (c) AppNearMe Ltd 2013
Definition in file ltc.h.
Function Documentation
| void ltc_ecc_del_point | ( | ecc_point * | p ) |
Free an ECC point from memory.
- Parameters:
-
p The point to free
Definition at line 66 of file ltc_ecc_points.c.
| int ltc_ecc_map | ( | ecc_point * | P, |
| void * | modulus, | ||
| void * | mp | ||
| ) |
Map a projective jacbobian point back to affine space.
- Parameters:
-
P [in/out] The point to map modulus The modulus of the field the ECC curve is in mp The "b" value from montgomery_setup()
- Returns:
- MINITLS_OK on success
Definition at line 51 of file ltc_ecc_map.c.
| int ltc_ecc_mul2add | ( | ecc_point * | A, |
| void * | kA, | ||
| ecc_point * | B, | ||
| void * | kB, | ||
| ecc_point * | C, | ||
| void * | modulus | ||
| ) |
Computes kA*A + kB*B = C using Shamir's Trick.
- Parameters:
-
A First point to multiply kA What to multiple A by B Second point to multiply kB What to multiple B by C [out] Destination point (can overlap with A or B modulus Modulus for curve
- Returns:
- CRYPT_OK on success
Definition at line 55 of file ltc_ecc_mul2add.c.
Perform a point multiplication (timing resistant)
- Parameters:
-
k The scalar to multiply by G The base point R [out] Destination for kG modulus The modulus of the field the ECC curve is in map Boolean whether to map back to affine or not (1==map, 0 == leave in projective)
- Returns:
- MINITLS_OK on success
Definition at line 55 of file ltc_ecc_mulmod_timing.c.
| ecc_point* ltc_ecc_new_point | ( | void | ) |
Allocate a new ECC point.
- Returns:
- A newly allocated point or NULL on error
Definition at line 49 of file ltc_ecc_points.c.
| int ltc_ecc_projective_add_point | ( | ecc_point * | P, |
| ecc_point * | Q, | ||
| ecc_point * | R, | ||
| void * | modulus, | ||
| void * | mp | ||
| ) |
Add two ECC points.
- Parameters:
-
P The point to add Q The point to add R [out] The destination of the double modulus The modulus of the field the ECC curve is in mp The "b" value from montgomery_setup()
- Returns:
- MINITLS_OK on success
Definition at line 53 of file ltc_ecc_projective_add_point.c.
Double an ECC point.
- Parameters:
-
P The point to double R [out] The destination of the double modulus The modulus of the field the ECC curve is in mp The "b" value from montgomery_setup()
- Returns:
- MINITLS_OK on success
Definition at line 52 of file ltc_ecc_projective_dbl_point.c.
Generated on Wed Jul 13 2022 00:22:55 by
1.7.2