~ubuntu-branches/ubuntu/utopic/nettle/utopic

« back to all changes in this revision

Viewing changes to testsuite/twofish-test.c

  • Committer: Package Import Robot
  • Author(s): Magnus Holmgren
  • Date: 2013-05-07 22:57:14 UTC
  • mfrom: (8.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130507225714-s331yr8ov53dtt17
Tags: 2.7-2
Tag some (ECC related) symbols that only exist on some architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "testutils.h"
2
2
#include "twofish.h"
3
3
 
4
 
int
 
4
void
5
5
test_main(void)
6
6
{
7
7
  /* 128 bit key */
8
8
  test_cipher(&nettle_twofish128,
9
 
              HL("0000000000000000 0000000000000000"),
10
 
              HL("0000000000000000 0000000000000000"),
11
 
              H("9F589F5CF6122C32 B6BFEC2F2AE8C35A"));
 
9
              SHEX("0000000000000000 0000000000000000"),
 
10
              SHEX("0000000000000000 0000000000000000"),
 
11
              SHEX("9F589F5CF6122C32 B6BFEC2F2AE8C35A"));
12
12
 
13
13
  /* 192 bit key */
14
14
  test_cipher(&nettle_twofish192,
15
 
              HL("0123456789ABCDEF FEDCBA9876543210"
16
 
                 "0011223344556677"),
17
 
              HL("0000000000000000 0000000000000000"),
18
 
              H("CFD1D2E5A9BE9CDF 501F13B892BD2248"));
 
15
              SHEX("0123456789ABCDEF FEDCBA9876543210"
 
16
                   "0011223344556677"),
 
17
              SHEX("0000000000000000 0000000000000000"),
 
18
              SHEX("CFD1D2E5A9BE9CDF 501F13B892BD2248"));
19
19
 
20
20
  /* 256 bit key */
21
21
  test_cipher(&nettle_twofish256,
22
 
              HL("0123456789ABCDEF FEDCBA9876543210"
23
 
                 "0011223344556677 8899AABBCCDDEEFF"),
24
 
              HL("0000000000000000 0000000000000000"),
25
 
              H("37527BE0052334B8 9F0CFCCAE87CFA20"));
26
 
 
27
 
  SUCCESS();
 
22
              SHEX("0123456789ABCDEF FEDCBA9876543210"
 
23
                   "0011223344556677 8899AABBCCDDEEFF"),
 
24
              SHEX("0000000000000000 0000000000000000"),
 
25
              SHEX("37527BE0052334B8 9F0CFCCAE87CFA20"));
28
26
}