commit | 6545ca7bed5ae6684ec5f4913a7f332b500fd2c6 | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Sat Jan 26 16:05:22 2013 +0100 |
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Sat Jan 26 19:11:24 2013 +0100 |
tree | 479502fcb220ee055f037a9c9fcb4449d1b8ef33 | |
parent | 0bad5c238135e5124881927093e8ee04ceb167f7 [diff] [blame] |
Add ECDH primitives
diff --git a/library/ecp.c b/library/ecp.c index 9153f11..b8b0dfc 100644 --- a/library/ecp.c +++ b/library/ecp.c
@@ -122,6 +122,14 @@ } /* + * Tell if a point is zero + */ +int ecp_is_zero( ecp_point *pt ) +{ + return( mpi_cmp_int( &pt->Z, 0 ) == 0 ); +} + +/* * Copy the contents of Q into P */ int ecp_copy( ecp_point *P, const ecp_point *Q )