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

Plaintext is not equal to Original #14

Closed
nitrieu opened this issue Jan 21, 2018 · 4 comments
Closed

Plaintext is not equal to Original #14

nitrieu opened this issue Jan 21, 2018 · 4 comments
Assignees

Comments

@nitrieu
Copy link

nitrieu commented Jan 21, 2018

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/amd64

What did you expect to see?

Expect:
Plaintext=Original=11111010

@anitgandhi anitgandhi self-assigned this Jan 21, 2018
@anitgandhi
Copy link
Contributor

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.

@nitrieu
Copy link
Author

nitrieu commented Jan 21, 2018

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

@anitgandhi
Copy link
Contributor

This is due to not 0-padding both A and B. Fix is in branch issue-14, will merge tomorrow.

@nitrieu
Copy link
Author

nitrieu commented Jan 23, 2018

thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants