MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / fe_frombytes

Function fe_frombytes

libraries/AP_CheckFirmware/monocypher.cpp:1224–1237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1222 h[5]=(i32)t5; h[6]=(i32)t6; h[7]=(i32)t7; h[8]=(i32)t8; h[9]=(i32)t9
1223
1224static void fe_frombytes(fe h, const u8 s[32])
1225{
1226 i64 t0 = load32_le(s); // t0 < 2^32
1227 i64 t1 = load24_le(s + 4) << 6; // t1 < 2^30
1228 i64 t2 = load24_le(s + 7) << 5; // t2 < 2^29
1229 i64 t3 = load24_le(s + 10) << 3; // t3 < 2^27
1230 i64 t4 = load24_le(s + 13) << 2; // t4 < 2^26
1231 i64 t5 = load32_le(s + 16); // t5 < 2^32
1232 i64 t6 = load24_le(s + 20) << 7; // t6 < 2^31
1233 i64 t7 = load24_le(s + 23) << 5; // t7 < 2^29
1234 i64 t8 = load24_le(s + 26) << 4; // t8 < 2^28
1235 i64 t9 = (load24_le(s + 29) & 0x7fffff) << 2; // t9 < 2^25
1236 FE_CARRY; // Carry recondition OK
1237}
1238
1239// Precondition
1240// |h[0]|, |h[2]|, |h[4]|, |h[6]|, |h[8]| < 1.1 * 2^25

Callers 5

scalarmultFunction · 0.85
ge_frombytes_vartimeFunction · 0.85
crypto_from_eddsa_publicFunction · 0.85
crypto_hidden_to_curveFunction · 0.85
crypto_curve_to_hiddenFunction · 0.85

Calls 2

load32_leFunction · 0.85
load24_leFunction · 0.85

Tested by

no test coverage detected