Comments (6)
Ed25519 needs quite a bit of RAM so if you are running it on an Arduino Uno or something similar with a small amount of memory, sometimes it can run out and crash.
I believe I may have derived some of the timings on my Web site using an Arduino Mega to get enough RAM for the operation to work. Even if the original timings were done on an Uno, then changes to the Arduino compiler over the years may have altered the memory layout enough that it doesn't fit any more.
from arduinolibs.
Thanks, @rweather, Is there a way to test this on Arduino Uno? as I am doing my project based on low-level devices (8-bit microcontroller) with less memory and Arduino Uno is of the correct specification.
May you please suggest.
from arduinolibs.
It's not easy - the amount of memory required for signature verification is pretty severe so you need to watch every byte used everywhere in the program. Keep things off the stack as much as possible. It only just barely fit in the first place.
The sign() function uses less memory, so you could look at the larger system design for that. If the Uno is communicating with a desktop machine, then try to arrange your high-level protocol so that the Uno does the signing and the desktop does the verifying. Then you don't need to worry about the memory requirements of verify().
Or have one Uno sign and the other verify - the TestEd25519 example has everything in one program but if you can strip away unnecessary parts you may be able to reclaim a little memory for the verifying device.
Otherwise you might need to go into the code and rearrange how it works. If you look at the verify() function, I reuse the memory inside the "hash" object for the "k" buffer. There may be other places where buffers could be overlapped, or the steps can be done in a different order that allows memory to be reclaimed.
from arduinolibs.
Thanks, @rweather , I have tried it on Arduino Mega2560, it is working fine and tested only verification process on Arduino Uno, it is also working.
I have one query, I am doing mathematical analysis (like the number of point multiplication and addition used) also, may you please let me know which standard algorithms you have used and where I can found their mathematical explanation.
from arduinolibs.
The main source of information on Ed25519 is from the RFC specification:
https://tools.ietf.org/html/rfc8032
The "Informative References" section contains links for the underlying academic papers that explain the mathematics involved.
from arduinolibs.
Thanks, @rweather, for the help.
from arduinolibs.
Related Issues (20)
- Use of htobe64 and other non-standard functions HOT 3
- Encrypt String longer than blockSize() HOT 5
- Asymmetric encryption/decryption? HOT 3
- Error compiling for new Arduino core for the ESP32 HOT 4
- Support for XChaCha20 Poly1305 HOT 2
- Need help with ChaCha and Strings HOT 1
- TestSpeck.ino fails on samd21 M0 after changing the plaintext HOT 1
- Asymmetric encryption HOT 1
- Including libraries does not work in platformio HOT 1
- default key? HOT 4
- Bug of Ascon128.c++ in Arduino Cryptography Library HOT 3
- TestSpeck.ino - Decryption fails for SpeckTiny with all key sizes HOT 1
- Crypto doesn't support next generation AVRs HOT 18
- ’SHA256‘ was not declared in this scope ESP32S3 HOT 6
- Crypto library "Hash.h" conflicting with ESP866 Arduino package "Hash.h" HOT 5
- Ascon128::decrypt doesn't seem to allow for inplace decryption, despite documentation saying so
- Support for SHA-512/256?
- crypto_feed_watchdog was not declared in this scope [ESP8266 & ESP32] HOT 3
- RNG.cpp include of <Arduino.h> makes native builds for unit testing and debugging fail
- Error Compiling for ESP8266 or ESP32 clean() not declared in scope AES CFB example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinolibs.