1

I am a Computer Engineering Undergrad, currently in a cryptography(computer security) course, and I was assigned to do projects about implementing µNaCl library onto Arduino. I currently own a nodemcu esp32 which serves as my device, and I have been searching for µNaCl libraries on the web, but the only thing I found was µNaCl library for AVR devices (based on the makefile of the library, i can see that it's designed for atmega128 and atmega2560). So my question is, is it possible to implement some library meant for AVR on my nodemcu? I mostly do my job with arduino libraries, and have never experimented with avr libraries on arduino, and especially considering my nodemcu is not using atmega-based architecture either, I kinda doubted it. And is the solution to my problem (if it's not possible to use avr based library on arduino) to go purchase a atmega128/atmega2560 and code on atmel studio?

Library: https://munacl.cryptojedi.org/atmega.shtml

Sorry for the long question, kinda desperate here.

6
  • That's hard to say without knowing the code, that you want to port. It should be possible, though it might mean rewriting the whole library. Please provide a link to the AVR library, that you are talking about. Commented Jun 29, 2020 at 19:46
  • the only link to the library i found was in the form of tarball packages so i guess it still needs to be 'make'-d on linux system, but here it goes munacl.cryptojedi.org/atmega.shtml i'll edit the post, thanks @chrisl Commented Jun 29, 2020 at 19:48
  • nvm sorry it was dumb, there are C files in the zip so you can still look for it without actually making the file first Commented Jun 29, 2020 at 20:07
  • Why not give it a try? The tarball contains two optimized versions of the library (optimized for size and speed) with some functions implemented in AVR assembly, but also a version in pure C. It could be that it doesn't work on an ILP32 target, but it shouldn't be too hard to just try. Commented Jun 29, 2020 at 20:38
  • 1
    It just looks like normal C code, nothing too hardware (or OS) specific, therefore it shouldn't be too hard to port. Maybe there's some difficult parts I didn't see, but I checked a few files. Commented Jul 1, 2020 at 3:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.