Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
ff1: remove TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anitgandhi committed Jan 22, 2018
1 parent 2b87c75 commit 420eba6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions ff1/ff1.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ func (c Cipher) EncryptWithTweak(X string, tweak []byte) (string, error) {
B := X[u:]

// Byte lengths
// TODO: can these calculations be done more efficiently?
b := int(math.Ceil(math.Ceil(float64(v)*math.Log2(float64(radix))) / 8))
d := int(4*math.Ceil(float64(b)/4) + 4)

Expand Down Expand Up @@ -218,8 +217,6 @@ func (c Cipher) EncryptWithTweak(X string, tweak []byte) (string, error) {
totalBufLen := lenQ + lenPQ + (maxJ-1)*blockSize
buf := make([]byte, totalBufLen)

// TODO: small inputs will likely cause Q length to be 16,
// could start with that with larger cap and expand as necessary?
// Q will use the first lenQ bytes of buf
// Only the last b+1 bytes of Q change for each loop iteration
Q := buf[:lenQ]
Expand Down Expand Up @@ -405,7 +402,6 @@ func (c Cipher) DecryptWithTweak(X string, tweak []byte) (string, error) {
B := X[u:]

// Byte lengths
// TODO: can these calculations be done more efficiently?
b := int(math.Ceil(math.Ceil(float64(v)*math.Log2(float64(radix))) / 8))
d := int(4*math.Ceil(float64(b)/4) + 4)

Expand Down Expand Up @@ -455,8 +451,6 @@ func (c Cipher) DecryptWithTweak(X string, tweak []byte) (string, error) {
totalBufLen := lenQ + lenPQ + (maxJ-1)*blockSize
buf := make([]byte, totalBufLen)

// TODO: small inputs will likely cause Q length to be 16,
// could start with that with larger cap and expand as necessary?
// Q will use the first lenQ bytes of buf
// Only the last b+1 bytes of Q change for each loop iteration
Q := buf[:lenQ]
Expand Down

0 comments on commit 420eba6

Please sign in to comment.