Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with encryption? #2

Open
solars opened this issue Jan 8, 2018 · 2 comments
Open

Problem with encryption? #2

solars opened this issue Jan 8, 2018 · 2 comments

Comments

@solars
Copy link

solars commented Jan 8, 2018

Hi there,

I seem to have a problem with encryption using the example. Somehow TTN does not decrypt or decrypts wrong.
I've outlined it in this discussion:
https://www.thethingsnetwork.org/forum/t/decrypt-aes-encoded-payload/11615/7

Is there anything wrong?

@dhakkest
Copy link

I think the Encrypt_Payload function uses the wrong key.
The function in Encrypt_V30.cpp encrypts the payload with:
AES_Encrypt(Block_A,NwkSkey);
This should be:
AES_Encrypt(Block_A,AppSkey);

@Batigolle
Copy link

I verified that the solution proposed by dhakkest is correct.
I changed line 86 in the encrypt_v30.cpp file,
the decrypts works !

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

No branches or pull requests

3 participants