0

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.

  • 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. – chrisl Jun 29 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 – Nobel Edgar Jun 29 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 – Nobel Edgar Jun 29 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. – Edgar Bonet Jun 29 at 20:38
  • use the original version, not the AVR version – Juraj Jun 30 at 5:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.