Closed nitrieu closed 6 years ago
Thanks for reporting. I'm able to reproduce this. It seems partially related to trailing zeros as I just tested that string with a base of 4 and got the same issue. I'm also able to reproduce it with various base2 strings but not all.
I'll continue to investigate.
Thank you. I got this example because I tested for all possible numbers from {0,1}^8. FYI, the code is correct for all cases from base 10
This is due to not 0-padding both A and B. Fix is in branch issue-14, will merge tomorrow.
thanks!
Description of Issue:
Plaintext is not equal to Original
Steps to Reproduce:
Follow Example Usage in main.go. Just replace original := "11111010", radix = 2, maxTlen=128
Output
Original: 11111010 Ciphertext: 1110011 Plaintext: 1011011
If applicable, mention which version(s) of Go you are able to reproduce this on, along with
go env
output. go version go1.9.2 windows/amd64What did you expect to see?
Expect: Plaintext=Original=11111010