Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


randomly generates a SymmetricKey object suitable for use with cryptographic functions.

generates a SymmetricKey object from the password string given.

randomly generates a symmetric key using the specified options.

Details and OptionsDetails and Options

  • GenerateSymmetricKey[] uses a system-specific, high-entropy randomness source.
  • GenerateSymmetricKey has a Method option that specifies the cryptography method to use.
  • The current default setting is .
  • With Method->"name", default settings for the specified method are used.
  • Particular settings can be specified using Method->assoc, where the entries in the association assoc are:
  • "Cipher""AES256"cipher to use
    "KeySize"Automaticsize of key in bits
    "InitializationVector"Noneinitialization vector
    "BlockMode""CBC"block chaining mode ("ECB","CBC", "OFB", "CFB")
  • Supported methods, together with default key size and initialization vector size, include:
  • "Blowfish"25664
  • The following ciphers can use any key size that is a multiple of 8:
  • "RC4"
  • All ciphers can use the block modes ECB, CBC, CFB, OFB other than RC4, which can only use None.
  • Possible settings for include:
  • Automaticgenerate an appropriate initialization vector
    ByteArray[]use an explicitly specified initialization vector
    Nonedo not include any initialization vector
  • With "InitializationVector"->None, Encrypt will generate a new initialization vector whenever it is run. In this case, the vector can be determined only from the EncryptedObject that is produced.
Introduced in 2015