Skip to content

Commit 9f6993f

Browse files
committed
Remove some dead code.
1 parent 357f8cd commit 9f6993f

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

src/group.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ typedef struct {
4040

4141
#define SECP256K1_GE_STORAGE_CONST_GET(t) SECP256K1_FE_STORAGE_CONST_GET(t.x), SECP256K1_FE_STORAGE_CONST_GET(t.y)
4242

43-
/** Set a group element equal to the point at infinity */
44-
static void secp256k1_ge_set_infinity(secp256k1_ge *r);
45-
4643
/** Set a group element equal to the point with given X and Y coordinates */
4744
static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y);
4845

@@ -79,9 +76,6 @@ static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp
7976
/** Set a group element (jacobian) equal to the point at infinity. */
8077
static void secp256k1_gej_set_infinity(secp256k1_gej *r);
8178

82-
/** Set a group element (jacobian) equal to the point with given X and Y coordinates. */
83-
static void secp256k1_gej_set_xy(secp256k1_gej *r, const secp256k1_fe *x, const secp256k1_fe *y);
84-
8579
/** Set a group element (jacobian) equal to another which is given in affine coordinates. */
8680
static void secp256k1_gej_set_ge(secp256k1_gej *r, const secp256k1_ge *a);
8781

src/group_impl.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, c
3333
r->infinity = a->infinity;
3434
}
3535

36-
static void secp256k1_ge_set_infinity(secp256k1_ge *r) {
37-
r->infinity = 1;
38-
}
39-
4036
static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const secp256k1_fe *y) {
4137
r->infinity = 0;
4238
r->x = *x;
@@ -156,13 +152,6 @@ static void secp256k1_gej_set_infinity(secp256k1_gej *r) {
156152
secp256k1_fe_set_int(&r->z, 0);
157153
}
158154

159-
static void secp256k1_gej_set_xy(secp256k1_gej *r, const secp256k1_fe *x, const secp256k1_fe *y) {
160-
r->infinity = 0;
161-
r->x = *x;
162-
r->y = *y;
163-
secp256k1_fe_set_int(&r->z, 1);
164-
}
165-
166155
static void secp256k1_gej_clear(secp256k1_gej *r) {
167156
r->infinity = 0;
168157
secp256k1_fe_clear(&r->x);

src/scalar_4x64_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,7 @@ static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a)
912912
secp256k1_scalar_reduce_512(r, l);
913913
}
914914

915+
#ifdef USE_ENDOMORPHISM
915916
static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) {
916917
r1->d[0] = a->d[0];
917918
r1->d[1] = a->d[1];
@@ -922,6 +923,7 @@ static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r
922923
r2->d[2] = 0;
923924
r2->d[3] = 0;
924925
}
926+
#endif
925927

926928
SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b) {
927929
return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3])) == 0;

0 commit comments

Comments
 (0)