lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


For inspiration take a look at libsodium or NaCL: https://en.wikipedia.org/wiki/NaCl_(software)

These interfaces are simple, and much harder to misuse than most. They're not much use for encrypting a long stream, but doing that correctly is pretty difficult.


On Thu, Aug 17, 2017 at 10:44 AM, Martin <eden_martin_fuhrspam@gmx.de> wrote:
In continuation of Dirk's Laurie proposal for standard interface for
common things...

How do you see generic interface for symmetric encryption/decryption?

Usually you can process input stream by parts (in case you wish to
encrypt 50GiB file which unlikely fit into string). Do you prefer
some functions encrypt()/decrypt() which returns output and inner
state, or object that holds inner state itself?

(There are a plenty of simple ciphers (Tea, Salsa, Spec) and I'd
wish to unite their implementations under common interface.)

-- Martin




--
--