Encrypt a String


#1

Hello all,

I have been searching on this forum for a little and also a bit on GitHub to try and find a AES or SHA 256 bit encoder/decoder library.

I have seen a few here that utilize AES 128 but sadly enough most of them are from the Spark days and no longer compile on new gen photons.

If anyone has any working examples of decrypting and encrypting I would love to see it, Im actually a bit surprised so little people in this community encrypt their data. I guess modern libraries of interface take the complexity of it away from the user.

The purpose of needing encryption is for encrypting the data on a MiFare card as an added layer of redundancy.

Thanks,
-Doc


#2

These are probably simply fixed, but without known wich libraries you refer to or what the error messages are, we can’t help.


#3

You mean on top of the current encryption?


#4

Yeah I assume its due to new versions of include statements. I remember a few talking about AES-128 such as this post.
I also tried many of the forks but couldnt seem to find a working one.

Preferably I would like something with 256 bit encryption.
I am not sure how many libraries there are in the particle build list, but I tried searching with a few terms, the only one I found was titled: Crypto Suite with 10 or so users.
Using their only example compiles with error: no file “sha256.h” (A reference to one of their includes).

If you know of any working hashing libraries I would be more than grateful. Ill keep looking, and try to find an Arduino library with 256 bit encryption in the meantime and maybe even upload it if it works.

And @BulldogLowell yeah particle takes care of a lot of it. The entire backbone is encrypted with AES 128 iirc. So users don’t have to worry about much of the load, but for interfacing with other objects that don’t contain this built-in encryption. (ie RFID cards) its up to us to implement it. Only reason i say so few is because of the lack of libraries I saw (maybe I just suck at searching) whilst there are about 10k people using both the PN532 and MFRC522 libraries for RFID. I mean I understand that a lot of people use these boards for more fun maker projects, but still; I have yet to find a working library for a hashing algo. ¯_(ツ)_/¯
I dunno I may have misinterpreted your comment, but ill go back to researching for now.

Thanks again for any and all help.


#5

I know miFare is somewhat different from wiegand, but I use the standard encryption for that and it seems fine from everyone in my industry. Why is 256 needed?


#6

Its not required per say, just preferred.
The block size of writeable data per sector in mifare is 48 bytes so I thought mind as well put the space to good use. If its more taxing on the processor though its probably best to use 128.

If you are interested in the memory map of MiFare cards here is a good place to quickly show the memory map. If you have any questions let me know. :slight_smile:

Thanks,
Brandon