MCPcopy Create free account
hub / github.com/albertobsd/keyhunt / AddAndShift

Method AddAndShift

secp256k1/IntMod.cpp:757–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755// ------------------------------------------------
756
757void Int::AddAndShift(Int *a, Int *b, uint64_t cH) {
758
759 unsigned char c = 0;
760 c = _addcarry_u64(c, b->bits64[0], a->bits64[0], bits64 + 0);
761 c = _addcarry_u64(c, b->bits64[1], a->bits64[1], bits64 + 0);
762 c = _addcarry_u64(c, b->bits64[2], a->bits64[2], bits64 + 1);
763 c = _addcarry_u64(c, b->bits64[3], a->bits64[3], bits64 + 2);
764 c = _addcarry_u64(c, b->bits64[4], a->bits64[4], bits64 + 3);
765#if NB64BLOCK > 5
766 c = _addcarry_u64(c, b->bits64[5], a->bits64[5], bits64 + 4);
767 c = _addcarry_u64(c, b->bits64[6], a->bits64[6], bits64 + 5);
768 c = _addcarry_u64(c, b->bits64[7], a->bits64[7], bits64 + 6);
769 c = _addcarry_u64(c, b->bits64[8], a->bits64[8], bits64 + 7);
770#endif
771
772 bits64[NB64BLOCK-1] = c + cH;
773
774}
775
776// ------------------------------------------------
777void Int::MontgomeryMult(Int *a) {

Callers 2

MontgomeryMultMethod · 0.80
ModMulK1orderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected