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

Bug in DES.c causing incorrect output #6

Closed
rswjr opened this issue Aug 6, 2018 · 3 comments
Closed

Bug in DES.c causing incorrect output #6

rswjr opened this issue Aug 6, 2018 · 3 comments
Labels

Comments

@rswjr
Copy link

rswjr commented Aug 6, 2018

In DES.c, line 296:
coordy += 2^(4 - jj);

This line seems to try to set the bit at position (4 - jj), but the caret symbol does not perform exponentiation in C. This is causing the program as written to produce the wrong ciphertext.

@mimoo
Copy link
Owner

mimoo commented Aug 7, 2018

good catch :) this is old code though, so I'm not going to fix it unless you want to submit a PR + some test vectors

@mimoo mimoo added the bug label Aug 7, 2018
@cmcqueen
Copy link

If you're going to share code, it is good to fix known bugs (regardless of whether the code is "old" or not).

@mimoo
Copy link
Owner

mimoo commented Feb 21, 2019

added the bug to the README

@mimoo mimoo closed this as completed Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants