PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/Experimentation/Investigations/Cryptography/AdvancedEncryptionStandard/plans/KeyDiscovery/064/1_16_4/general.hpp

https://github.com/OKullmann/oklibrary
C++ Header | 65 lines | 0 code | 1 blank | 64 comment | 0 complexity | 82f326a885a407e878f0081d72932b5e MD5 | raw file
  1. // Matthew Gwynne, 18.7.2011 (Swansea)
  2. /* Copyright 2011 Oliver Kullmann
  3. This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
  4. it and/or modify it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation and included in this library; either version 3 of the
  6. License, or any later version. */
  7. /*!
  8. \file Investigations/Cryptography/AdvancedEncryptionStandard/plans/KeyDiscovery/064/1_16_4/general.hpp
  9. \brief Investigations into small-scale AES key discovery for AES with a 1x16 plaintext matrix and 4-bit field elements
  10. \todo Problem specification
  11. <ul>
  12. <li> We consider the small-scale AES with 1 row, 16 column, using the 4-bit
  13. field size for rounds 1 to 20. </li>
  14. <li> We denote this AES instance by aes(r,1,16,4) for r in 1,...,20. </li>
  15. <li> We investigate translations of the key discovery problem for
  16. aes(r,1,16,4) into SAT. </li>
  17. <li> aes(r,1,16,4) takes a 64-bit plaintext and 64-bit key and outputs a
  18. 64-bit ciphertext. </li>
  19. <li> aes(r,1,16,4) applies the following operations:
  20. <ol>
  21. <li> Key schedule which takes the key and generates r+1 64-bit round
  22. keys. </li>
  23. <li> Application of the following operation (the "round") r times:
  24. <ol>
  25. <li> Addition of round key n-1. </li>
  26. <li> Application of Sbox operation to each byte. </li>
  27. </ol>
  28. </li>
  29. <li> Addition of round key r+1. </li>
  30. <li> The result of the last round key addition is the ciphertext. </li>
  31. </ol>
  32. </li>
  33. <li> Round key 0 is the input key. </li>
  34. <li> The key schedule computes the round key i from round key i-1 by:
  35. \verbatim
  36. K_(i,1,k) := S-box(K_(i-1,1,16)) + C_i + sum(K_(i-1,j,l),l,1,j)
  37. \endverbatim
  38. where
  39. <ul>
  40. <li> C_i is the round constant for round i; </li>
  41. <li> K_(i,j,k) is the 4-bit word in the j-th row, k-th column of the i-th
  42. round-key considered as a 1x16X matrix. </li>
  43. </ul>
  44. </li>
  45. <li> The S-box is a permutation from {0,1}^4 to {0,1}^4 which we consider
  46. as either:
  47. <ul>
  48. <li> an 8x1 boolean function; see ss_sbox_bf in
  49. ComputerAlgebra/Cryptology/Lisp/CryptoSystems/Rijndael/AdvancedEncryptionStandard.mac;
  50. </li>
  51. <li> 4 4x1 boolean functions. </li>
  52. </ul>
  53. </li>
  54. <li> The decompositions and translations are listed in "Investigating
  55. dimensions" in
  56. Cryptography/AdvancedEncryptionStandard/plans/Experimentation.hpp.
  57. </li>
  58. <li> The plaintext and ciphertext variables are then set, and the SAT
  59. SAT solver is run on this instance to deduce the key variables. </li>
  60. </ul>
  61. */