Decrypt

Decrypt["password",enc]

attempts to decrypt the encrypted object enc using the specified password.

Decrypt[keyspec,enc]

attempts to decrypt using the cryptographic key specification keyspec.

Decrypt[key,bytes]

attempts to decrypt the ByteArray object bytes, to give another ByteArray object.

Decrypt[obj]

interactively requests a password with which to try to decrypt obj.

Details

Examples

open allclose all

Basic Examples  (3)

Encrypt a message with a password:

Decrypt with the same password to get back the message:

Generate a key:

Encrypt using the key:

Decrypt using the key:

Generate public and private keys:

Encrypt using the public key:

Decrypt using the private key:

Alternatively, encrypt using the private key:

Now decrypt using the public key:

Scope  (2)

Encrypt any expression:

Decrypt to get back the exact expression:

Decrypt can be passed a ByteArray:

Applications  (1)

Write simple cryptographic signing and verification functions:

Generate a pair of public and private keys:

Define an expression to sign:

Generate a signature:

Verify that the signature is authentic:

Verifying with another expression will fail:

Possible Issues  (1)

Decrypting using the wrong key will yield a message:

Wolfram Research (2015), Decrypt, Wolfram Language function, https://reference.wolfram.com/language/ref/Decrypt.html (updated 2019).

Text

Wolfram Research (2015), Decrypt, Wolfram Language function, https://reference.wolfram.com/language/ref/Decrypt.html (updated 2019).

BibTeX

@misc{reference.wolfram_2020_decrypt, author="Wolfram Research", title="{Decrypt}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Decrypt.html}", note=[Accessed: 14-May-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_decrypt, organization={Wolfram Research}, title={Decrypt}, year={2019}, url={https://reference.wolfram.com/language/ref/Decrypt.html}, note=[Accessed: 14-May-2021 ]}

CMS

Wolfram Language. 2015. "Decrypt." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Decrypt.html.

APA

Wolfram Language. (2015). Decrypt. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Decrypt.html