octoate / arduinodes Goto Github PK
View Code? Open in Web Editor NEWDES and Triples DES encryption and decryption for the Arduino microcontroller platform
License: GNU General Public License v3.0
DES and Triples DES encryption and decryption for the Arduino microcontroller platform
License: GNU General Public License v3.0
Hi there!
I get this error while trying to build for BLE Nano:
/Users/luposlip/Dropbox/ArduinoWS/2015/libraries/DES/DES.cpp: In member function 'void DES::tdesCbcEncipher(byte*, byte*)':
/Users/luposlip/Dropbox/ArduinoWS/2015/libraries/DES/DES.cpp:478:21: error: 'printf_P' was not declared in this scope
printf_P(PSTR("\n"));
^
/Users/luposlip/Dropbox/ArduinoWS/2015/libraries/DES/DES.cpp: In member function 'void DES::tdesCbcDecipher(byte*, byte*)':
/Users/luposlip/Dropbox/ArduinoWS/2015/libraries/DES/DES.cpp:511:21: error: 'printf_P' was not declared in this scope
printf_P(PSTR("\n"));
^
libraries/DES/DES.cpp: In member function 'void DES::printArray(byte*, bool)':
libraries/DES/DES.cpp:549:40: error: 'printf_P' was not declared in this scope
printf_P(PSTR("%c"),output[j*8 + i]);
^
libraries/DES/DES.cpp:552:22: error: 'printf_P' was not declared in this scope
printf_P(PSTR("\n"));
^
libraries/DES/DES.cpp: In member function 'void DES::printArray(byte*, int)':
libraries/DES/DES.cpp:561:34: error: 'printf_P' was not declared in this scope
printf_P(PSTR("%x"),output[i]);
^
libraries/DES/DES.cpp:563:22: error: 'printf_P' was not declared in this scope
printf_P(PSTR("\n"));
^
Error compiling.
I'm trying to compile the simple DES example:
https://github.com/Octoate/ArduinoDES/tree/master/examples/DESexample
Any ideas?
Best,
Henrik
In function '__base_ctor .constprop',
inlined from '__static_initialization_and_destruction_0.constprop' at C:\Users\matthew\Documents\Arduino\SenderUnoBinaryEncrypted\SenderUnoBinaryEncrypted.ino:7:5,
inlined from 'global constructors keyed to 65535_0_SenderUnoBinaryEncrypted.ino.cpp.o' at C:\Users\matthew\Documents\Arduino\SenderUnoBinaryEncrypted\SenderUnoBinaryEncrypted.ino:135:1:
C:\Users\matthew\Documents\Arduino\libraries\ArduinoDES-master\DES.cpp:177:9: warning: '__builtin_strcpy' writing 25 bytes into a region of size 24 overflows the destination [-Wstringop-overflow=]
sprintf((char *)key,"000000000000000000000000\0");
^
Hi,
Thank you for your helpful library.
It has been useful for me, and hope that you will always continue to support this open source community.
By using this current, library, I've managed to encrypt and decrypt the 3DES and get the same result as I expected with using 8 byte.
For now, we would like to decrypt 32 byte of data, and is this possible?
And if yes, how can we do it.
Thank you and looking forward for your reply.
-Amin
Is there anyway to calculate kcv using this library?
I ran the example code inside the folder. It worked well, but only able to encrypt natural number from 0 to 255, any number bigger will result incorrect, and most of all, I cant encrypt String type.
I tried to change data type of input, output array to String and else, but none is work.
Anyone still here to help?
hello octoate.
i am converting your library to a more sofisticated stacture, implementing the IV and KEY in the class and coding some improvements. I will do that for the reaspberry as well.
The main limitation of the advanced library so far is, trying to encrypt more than 160 bytes of input data (not including the padding) the programm crush. Probably from memory fragmentation as there are many memory blocks needed in order to declare, pad and encrypt the given plaintext string (byte [] = "test..........."). do you think 160 bytes of input data as suficient for the arduino? if yes, i will finish the library (only the padding validation check while decrypting is left to inmplement), and i will make the code compatible with raspberry Pi as well. Moreover i will make a new pull request for you to see the changes and if you want commit them in your respository as well.
Thanks spaniakos
Hey there,
I am using the following line:
des.encrypt(writeData, encryptData, encryptionKey);
writeData is a 16 byte uint8_t array, so is encryptData. I've varied encryptionKey between 8 and 16 entry byte arrays, but the result in writeData is always the first 8 bytes changed (encrypted, presumably), but the later 8 are still the initial value. Since the code for this library is way above my level, I was hoping you could help me with this.
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.