b30a75581921e1b4ccdce8088b376b3b91a8ad12
[openssl.git] / README.FIPS
1 Preliminary status and build information for FIPS module v2.0
2
3 NB: if you are cross compiling you now need to use the latest "incore2" script
4 from http://www.openssl.org/docs/fips/incore2
5
6 If you have any object files from a previous build do:
7
8 make clean
9
10 To build the module do:
11
12 ./config fipscanisterbuild
13 make
14
15 Build should complete without errors.
16
17 Run test suite:
18
19 test/fips_test_suite
20
21 again should complete without errors.
22
23 Run test vectors: 
24
25 1. Download an appropriate set of testvectors from www.openssl.org/docs/fips
26    those for 2007 are OK.
27
28 2. Extract the files to a suitable directory.
29
30 3. Run the test vector perl script, for example:
31
32    cd fips
33    perl fipsalgtest.pl --dir=/wherever/stuff/was/extracted
34
35 4. It should say "passed all tests" at the end. Report full details of any
36    failures.
37
38 Run:
39
40 make clean
41
42 to remove any object modules from previous compile.
43
44 Run symbol hiding test:
45
46 ./config fipscanisteronly -DOPENSSL_FIPSSYMS
47 make
48
49 This time only the fips utilities should be built.
50
51 Examine the external symbols in fips/fipscanister.o they should all begin
52 with FIPS or fips. One way to check with GNU nm is:
53
54 nm -g --defined-only fips/fipscanister.o | grep -v -i fips
55
56 If you get *any* output at all from this test (i.e. symbols not starting with
57 fips or FIPS) please report it.
58
59 Restricted tarball tests.
60
61 The validated module will have its own tarball containing sufficient code to
62 build fipscanister.o and the associated algorithm tests. You can create a
63 similar tarball yourself for testing purposes using the commands below.
64
65 Standard restricted tarball:
66
67 make -f Makefile.fips dist
68
69 Prime field field only ECC tarball:
70
71 make NOEC2M=1 -f Makefile.fips dist
72
73 Once you've created the tarball extract into a fresh directory and do:
74
75 ./config
76 make
77
78 You can then run the algorithm tests as above. This build automatically uses
79 fipscanisteronly and -DOPENSSL_FIPSYMS and no-ec2m as appropriate.
80
81 FIPS capable OpenSSL test: WARNING PRELIMINARY INSTRUCTIONS, SUBJECT TO CHANGE.
82
83 At least initially the test module and FIPS capable OpenSSL may change and
84 by out of sync. You are advised to check for any changes and pull the latest
85 source from CVS if you have problems. See anon CVS and rsync instructions at:
86
87 http://www.openssl.org/source/repos.html
88
89 Make or download a restricted tarball from ftp://ftp.openssl.org/snapshot/
90
91 If required set the environment variable FIPSDIR to an appropriate location
92 to install the test module. If cross compiling set other environment
93 variables too.
94
95 In this restricted tarball on a Linux or U*ix like system run:
96
97 ./config
98 make
99 make install
100
101 On Windows from a VC++ environment do:
102
103 ms\do_fips
104
105 This will build and install the test module and some associated files.
106
107 Now download the latest version of the OpenSSL 1.0.1 branch from either a
108 snapshot or preferably CVS. For Linux do:
109
110 ./config fips [other args]
111 make
112
113 For Windows:
114
115 perl Configure VC-WIN32 [other args]
116 ms\do_nasm
117 nmake -f ms\ntdll.mak
118
119 (or ms\nt.mak for a static build).
120
121 Where [other args] can be any other arguments you use for an OpenSSL build
122 such as "shared" or "zlib".
123
124 This will build the fips capable OpenSSL and link it to the test module. You
125 can now try linking and testing applications against the FIPS capable OpenSSL.
126
127 Please report any problems to either the openssl-dev mailing list or directly
128 to me steve@openssl.org . Check the mailing lists regularly to avoid duplicate
129 reports.
130
131 Known issues:
132
133 Algorithm tests are pre-2011.
134 The fipslagtest.pl script wont auto run new algorithm tests such as DSA2.
135 Code needs extensively reviewing to ensure it builds correctly on 
136 supported platforms and is compliant with FIPS 140-2.
137 The "FIPS capable OpenSSL" is still largely untested, it builds and runs
138 some simple tests OK on some systems but needs far more "real world" testing.