DerivedKey

DerivedKey[assoc]

represents a derived key generated by GenerateDerivedKey.

Details

  • DerivedKey is an object containing a secure key, which can be used in place of a plain-text password.
  • DerivedKey contains all the information necessary to verify the password used to generate the key.
  • In DerivedKey[assoc], the association assoc contains the following:
  • "Function"key derivation function used
    "FunctionParameters"arguments of the key derivation function
    "DerivedKey"derived key
    "Salt"salt used to derive the key
  • The value of "FunctionParameters" is an Association that contains "KeySize" and parameters specific to the key derivation function used.
  • DerivedKey[assoc]["prop"] gives the specified element of assoc; it is equivalent to assoc["prop"].
  • DerivedKey[assoc]["PHCString"] gives a string representation of the derived key.
  • DerivedKey[assoc]["KeySize"] gives the size of the key in bits.
  • DerivedKey[assoc]["Parameters"] gives all the information contained in the object, as an association.
  • DerivedKey[assoc]["Properties"] gives a list of available properties.

Examples

Basic Examples  (7)

Generate a derived key:

Extract the derived sequence of bytes:

Extract the name of the key derivation function used:

Extract key derivation function parameters:

Obtain derived key as a hex string:

Verify password using DerivedKey:

Verify password using hex string representation of DerivedKey:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_derivedkey, author="Wolfram Research", title="{DerivedKey}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/DerivedKey.html}", note=[Accessed: 23-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_derivedkey, organization={Wolfram Research}, title={DerivedKey}, year={2020}, url={https://reference.wolfram.com/language/ref/DerivedKey.html}, note=[Accessed: 23-April-2024 ]}