Decrypt
✖
Decrypt
Details

- Decrypt[…,enc] takes an EncryptedObject[…] generated by Encrypt.
- In a notebook interface, Decrypt[expr] generates a dialog box; in a textual interface it generates a textual prompt.
- For a symmetric encryption method, Decrypt[key,Encrypt[key,expr]] gives expr.
- Decrypt returns an expression in the form specified by EncryptedObject[…]["OriginalForm"].
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Encrypt a message with a password:

https://wolfram.com/xid/0puzyvckhi-n1waj4

Decrypt with the same password to get back the message:

https://wolfram.com/xid/0puzyvckhi-pvra37


https://wolfram.com/xid/0puzyvckhi-kzg01t


https://wolfram.com/xid/0puzyvckhi-n1tl7l


https://wolfram.com/xid/0puzyvckhi-5xriaw

Generate public and private keys:

https://wolfram.com/xid/0puzyvckhi-cwxm9r


https://wolfram.com/xid/0puzyvckhi-ipnt9s

Decrypt using the private key:

https://wolfram.com/xid/0puzyvckhi-pqhpfb

Alternatively, encrypt using the private key:

https://wolfram.com/xid/0puzyvckhi-sgnkj4

Now decrypt using the public key:

https://wolfram.com/xid/0puzyvckhi-1kevv2

Scope (3)Survey of the scope of standard use cases

https://wolfram.com/xid/0puzyvckhi-rrb3jz

Decrypt to get back the exact expression:

https://wolfram.com/xid/0puzyvckhi-jicptj

To decrypt byte array encrypted data, Decrypt needs to know details of the encryption algorithm used:

https://wolfram.com/xid/0puzyvckhi-4rg4u
Create an EncryptedObject to specify the cipher, padding mode and format of the plaintext message:

https://wolfram.com/xid/0puzyvckhi-dbcmlw

Decrypt using the correct password or key:

https://wolfram.com/xid/0puzyvckhi-b1xtfk

Symmetric ciphers usually require an initialization vector for decryption:

https://wolfram.com/xid/0puzyvckhi-ebjcll
Create an EncryptedObject to specify the cipher, block mode, initialization vector and format of the plaintext message:

https://wolfram.com/xid/0puzyvckhi-dxzic2

Decrypt using the correct password or key:

https://wolfram.com/xid/0puzyvckhi-pbuhfa

Applications (1)Sample problems that can be solved with this function
Write simple cryptographic signing and verification functions:

https://wolfram.com/xid/0puzyvckhi-isk1hv

https://wolfram.com/xid/0puzyvckhi-65xzmd
Generate a pair of public and private keys:

https://wolfram.com/xid/0puzyvckhi-qbo127


https://wolfram.com/xid/0puzyvckhi-7fxog


https://wolfram.com/xid/0puzyvckhi-thz5mt

Verify that the signature is authentic:

https://wolfram.com/xid/0puzyvckhi-d3elvz

Verifying with another expression will fail:

https://wolfram.com/xid/0puzyvckhi-pk0bzd

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).
Wolfram Research (2015), Decrypt, Wolfram Language function, https://reference.wolfram.com/language/ref/Decrypt.html (updated 2019).
CMS
Wolfram Language. 2015. "Decrypt." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/Decrypt.html.
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
Wolfram Language. (2015). Decrypt. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Decrypt.html
BibTeX
@misc{reference.wolfram_2025_decrypt, author="Wolfram Research", title="{Decrypt}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/Decrypt.html}", note=[Accessed: 01-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_decrypt, organization={Wolfram Research}, title={Decrypt}, year={2019}, url={https://reference.wolfram.com/language/ref/Decrypt.html}, note=[Accessed: 01-June-2025
]}