cardano-crypto-praos/cbits/vrf10_batchcompat/convert.c
static void
multiply_by_cofactor(ge25519_p3 *point) {
    ge25519_cached tmp_point;
    ge25519_p1p1   tmp2_point;

    ge25519_p3_to_cached(&tmp_point, point);     /* tmp = input */
    ge25519_add(&tmp2_point, point, &tmp_point); /* tmp2 = 2*input */
    ge25519_p1p1_to_p3(point, &tmp2_point);      /* point = 2*input */
    ge25519_p3_to_cached(&tmp_point, point);     /* tmp = 2*input */
    ge25519_add(&tmp2_point, point, &tmp_point); /* tmp2 = 4*input */
    ge25519_p1p1_to_p3(point, &tmp2_point);      /* point = 4*input */
    ge25519_p3_to_cached(&tmp_point, point);     /* tmp = 4*input */
    ge25519_add(&tmp2_point, point, &tmp_point); /* tmp2 = 8*input */
    ge25519_p1p1_to_p3(point, &tmp2_point);      /* point = 8*input */
}
/* Utility function to multiply a point by the cofactor (8) in place. */
Utility function to multiply a point by the cofactor (8) in place.
Utility function to multiply a point by the cofactor ( 8 ) in place .
static void
multiply_by_cofactor(ge25519_p3 *point) {
    ge25519_cached tmp_point;
    ge25519_p1p1   tmp2_point;
    ge25519_p3_to_cached(&tmp_point, point);     
    ge25519_add(&tmp2_point, point, &tmp_point); 
    ge25519_p1p1_to_p3(point, &tmp2_point);      
    ge25519_p3_to_cached(&tmp_point, point);     
    ge25519_add(&tmp2_point, point, &tmp_point); 
    ge25519_p1p1_to_p3(point, &tmp2_point);      
    ge25519_p3_to_cached(&tmp_point, point);     
    ge25519_add(&tmp2_point, point, &tmp_point); 
    ge25519_p1p1_to_p3(point, &tmp2_point);      
}
static void multiply_by_cofactor ( ge25519_p3 * point ) { ge25519_cached tmp_point ; ge25519_p1p1 tmp2_point ; ge25519_p3_to_cached ( & tmp_point , point ) ; ge25519_add ( & tmp2_point , point , & tmp_point ) ; ge25519_p1p1_to_p3 ( point , & tmp2_point ) ; ge25519_p3_to_cached ( & tmp_point , point ) ; ge25519_add ( & tmp2_point , point , & tmp_point ) ; ge25519_p1p1_to_p3 ( point , & tmp2_point ) ; ge25519_p3_to_cached ( & tmp_point , point ) ; ge25519_add ( & tmp2_point , point , & tmp_point ) ; ge25519_p1p1_to_p3 ( point , & tmp2_point ) ; }
Utility function to multiply a point by the cofactor (8) in place.
Utility function to multiply a point by the cofactor ( 8 ) in place .
/* tmp = input */ /* tmp2 = 2*input */ /* point = 2*input */ /* tmp = 2*input */ /* tmp2 = 4*input */ /* point = 4*input */ /* tmp = 4*input */ /* tmp2 = 8*input */ /* point = 8*input */