Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing one-off en/decrypt methods #4

Closed
mikeboers opened this issue Jul 20, 2012 · 0 comments
Closed

Missing one-off en/decrypt methods #4

mikeboers opened this issue Jul 20, 2012 · 0 comments

Comments

@mikeboers
Copy link
Owner

See #3 for genesis of this issue.

TomCrypt has a number of "memory" functions to encrypt a message without setting up a cipher and walking through all of the stages. We should expose a similar functionality in order to assist in the interoperability with other major crypto libraries.

The straight encryption modes are simple enough, but we need to do some research as to how other libraries handle the MACs generated by cipher auth modes. In the case of the linked issue the other library simply concatenates the MAC onto the end of the string.

The proposed interface is:

from tomcrypt.cipher import aes
aes.encrypt("my message", key=b"0123456789abcdef", iv=b"...", mode="ctr", ...) # Returns the encrypted message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant