3

I'm going to assume that you only need the most standard capabilities and nothing fancy, so at most things like standard authenticated encryption primitives and thelike. No secret sharing, no format preserving encryption and no password based key derivation or other fancy password hashing schemes. So if you do indeed only need the basic schemes there are ...


3

Yes, LibTomCrypt. LibTomCrypt implements most common cryptographic primitives (and many uncommon ones), including RSA (PKCS#1 v1.5, PSS and OAEP modes). The code is clean and portable C, so you can link it into applications written in pretty much any programming language. The library is made of small objects so that only the code you actually need will get ...


2

You could download the source of the OpenSSL libcrypto from here and just use - with appropriate attributions - the parts that you need in your boot ROM. Supported algorithms, (According to Wikipedea): Ciphers AES, Blowfish, Camellia, SEED, CAST-128, DES, IDEA, RC2, RC4, RC5, Triple DES, GOST 28147-89 Cryptographic hash functions MD5, MD4, MD2, SHA-1, ...


2

Detection and identification While it is possible to identify a cryptographic algorithm by way of cipher bit sequences, you should know that it can be difficult and (more important) reverse-engineering protection mechanisms like encryption may be illegal in your country. Assuming your country does not uphold any related restrictions, and depending the ...


2

libsodium's default implementation fits in a single, (currently) 371 lines of C code. See the randombytes/sysrandom/randombytes_sysrandom.c file.


2

Gpg (GNU Privacy Guard) is a OpenPGP implementation. There are several frontend applications, although I never tried any of them; I prefer the command line. To encrypt: gpg --symmetric --armor --cipher-algo AES 12-words.txt It will prompt for a passphrase and create a 12-words.txt.asc file with encrypted data (ASCII characters). To decrypt: gpg --...


2

This is rather specific so I don't think there is a ready made solution. With the right libraries it is however simple to create one. package nl.owlstead.crypto; import java.io.FileInputStream; import java.io.FileOutputStream; import org.bouncycastle.crypto.engines.RijndaelEngine; import org.bouncycastle.crypto.modes.CBCBlockCipher; import org....


1

As @SEJPM notes in the comments, the well-known Bouncy Castle library has an implementation of ElGamal asymmetric encryption. Here are some examples of how to use it. I've successfully used Bouncy Castle in a few projects so far, but not this particular type of encryption, so I can't comment on the specific reliability of this component.


1

A more bare-bones means of symmetric encryption with Rijndael is ccrypt. You can use Base64 to format the binary data in a way that's relatively easy to read and write by hand. $ printf 'first second third fourth fifth banana orange pineapple watermelon aircraft tree blue' | ccrypt | base64 Enter encryption key: abc Enter encryption key: (repeat) abc ...


1

https://github.com/awslabs/s2n This is amazons attempt to rebuild openssl with only the modern features needed. It has according to amazon passed 3 security audits. It has something like 6,000 lines of code.


1

A Java implementation is now available at https://github.com/Art3misOne/sidh.


1

There isn't one, as of this posting. The best available implementations of SIDH are in C and there are some others of academic quality (read, not for production) in Sage/Python.


1

This is not possible. DSA stands for Digital Signature Algorithm. DSA cannot be used for encryption / decryption. You must be mistaken with RSA that can be used for both. For the Diffie-Hellman (discrete logarithm) problem on which DSA is based there are a few options. One is (EC)DH-IES, another ElGamal encryption. However, from your limited specifications ...


1

Shrib Shrib is a webapp for saving and sharing notes. It also has the option to encrypt them via password, email address, or phone number. Requested features: Able to save long notes. This is an example note with 60 000 dots. Password is softwarerecs


1

I'll tentatively suggest mbed TLS, formerly known as PolarSSL. Tentatively because I've never actually used it in an embedded project. It's maintained by ARM, and was designed to fit well on low-end platforms. The source code is fairly clean, portable C. You can easily pick the sources files you're interested in and omit the rest. RSA and ECDSA are ...


1

Easy-ecc worked for me and it beats everything else by two orders of magnitude in terms of simplicity. https://github.com/esxgx/easy-ecc My second choice would be libtomcrypt (+ libtommath), although last time I've tried it I wasn't able quickly cut it to less than 100 kB binary on 32-bit DSP, so it may be not viable for bootloader.


Only top voted, non community-wiki answers of a minimum length are eligible