Skip to content

Commit d5d3e74

Browse files
feat: added comment for bitAt function
1 parent 3efac65 commit d5d3e74

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ecc/bn254/fr/sis/sis.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ func (r *RSis) Sum(b []byte) []byte {
172172

173173
// bitwise decomposition of the buffer, in order to build m (the vector to hash)
174174
// as a list of polynomials, whose coefficients are less than r.B bits long.
175+
// Say buf=[0xbe,0x0f]. As a stream of bits it is interpreted like this:
176+
// 10111110 00001111. BitAt(0)=1 (=leftmost bit), bitAt(1)=0 (=second leftmost bit), etc.
175177
nbBits := len(buf) * 8
176178
bitAt := func(i int) uint8 {
177179
k := i / 8

0 commit comments

Comments
 (0)