tsip_rijndael.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (C) 2010-2011 Mamadou Diop.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. /**@file tsip_rijndael.h
  23. * @brief Rijndael Implementation.
  24. *
  25. * @section DESCRIPTION
  26. *
  27. * @sa 3G Security
  28. * <a href="http://www.3gpp.org/ftp/Specs/html-info/35205.htm"> 3GPP TS 35.205 </a>
  29. * <a href="http://www.3gpp.org/ftp/Specs/html-info/35206.htm"> 3GPP TS 35.206 </a>
  30. * <a href="http://www.3gpp.org/ftp/Specs/html-info/35207.htm"> 3GPP TS 35.207 </a>
  31. * <a href="http://www.3gpp.org/ftp/Specs/html-info/35208.htm"> 3GPP TS 35.208 </a>
  32. * <a href="http://www.3gpp.org/ftp/Specs/html-info/35909.htm"> 3GPP TS 35.909 </a>
  33. *-------------------------------------------------------------------
  34. * Rijndael Implementation
  35. *-------------------------------------------------------------------
  36. *
  37. * A sample 32-bit orientated implementation of Rijndael, the
  38. * suggested kernel for the example 3GPP authentication and key
  39. * agreement functions.
  40. *
  41. * This implementation draws on the description in section 5.2 of
  42. * the AES proposal and also on the implementation by
  43. * Dr B. R. Gladman <brg@gladman.uk.net> 9th October 2000.
  44. * It uses a number of large (4k) lookup tables to implement the
  45. * algorithm in an efficient manner.
  46. *
  47. * Note: in this implementation the State is stored in four 32-bit
  48. * words, one per column of the State, with the top byte of the
  49. * column being the _least_ significant byte of the word.
  50. *
  51. *-----------------------------------------------------------------
  52. *
  53. * @author Mamadou Diop <diopmamadou(at)doubango[dot]org>
  54. *
  55. */
  56. #ifndef TINYSIP_AUTHENTICATION_RIJNDAEL_H
  57. #define TINYSIP_AUTHENTICATION_RIJNDAEL_H
  58. #include "tinysip_config.h"
  59. TSIP_BEGIN_DECLS
  60. void RijndaelKeySchedule( uint8_t key[16] );
  61. void RijndaelEncrypt( uint8_t in[16], uint8_t out[16] );
  62. TSIP_END_DECLS
  63. #endif /*TINYSIP_AUTHENTICATION_RIJNDAEL_H*/