What is an s2k algorithm?

Posted by WilliamKF on Stack Overflow See other posts from Stack Overflow or by WilliamKF
Published on 2010-05-16T21:06:33Z Indexed on 2010/05/16 21:10 UTC
Read the original article Hit count: 427

Filed under:
|
|
|

What is the definition of an s2k algorithm? For example, "PBKDF2(SHA-1)" is an s2k algorithm.

Here is some Botan code that refers to s2k:

  AutoSeeded_RNG rng;

  std::auto_ptr<S2K> s2k(get_s2k("PBKDF2(SHA-1)"));
  s2k->set_iterations(8192);
  s2k->new_random_salt(rng, 8);

  SymmetricKey bc_key = s2k->derive_key(key_len, "BLK" + passphrase);
  InitializationVector iv = s2k->derive_key(iv_len, "IVL" + passphrase);
  SymmetricKey mac_key = s2k->derive_key(16, "MAC" + passphrase);

Also, what is a 'salt' in s2k?

© Stack Overflow or respective owner

Related posts about s2k

Related posts about encryption