bn_mont.c: get corner cases right in updated BN_from_montgomery_word.
[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 "incore" script
4 this can be found at util/incore in the tarballs.
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 fipscanisteronly
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    only the fips-2.0 testvector files are usable for complete tests.
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 If you wish to use the older 1.2.x testvectors (for example those from 2007)
39 you need the command line switch --disable-v2 to fipsalgtest.pl
40
41 Examine the external symbols in fips/fipscanister.o they should all begin
42 with FIPS or fips. One way to check with GNU nm is:
43
44         nm -g --defined-only fips/fipscanister.o | grep -v -i fips
45
46 If you get *any* output at all from this test (i.e. symbols not starting with
47 fips or FIPS) please report it.
48
49 Restricted tarball tests.
50
51 The validated module will have its own tarball containing sufficient code to
52 build fipscanister.o and the associated algorithm tests. You can create a
53 similar tarball yourself for testing purposes using the commands below.
54
55 Standard restricted tarball:
56
57 make -f Makefile.fips dist
58
59 Prime field field only ECC tarball:
60
61 make NOEC2M=1 -f Makefile.fips dist
62
63 Once you've created the tarball extract into a fresh directory and do:
64
65 ./config
66 make
67
68 You can then run the algorithm tests as above. This build automatically uses
69 fipscanisterbuild and no-ec2m as appropriate.
70
71 FIPS capable OpenSSL test: WARNING PRELIMINARY INSTRUCTIONS, SUBJECT TO CHANGE.
72
73 At least initially the test module and FIPS capable OpenSSL may change and
74 by out of sync. You are advised to check for any changes and pull the latest
75 source from CVS if you have problems. See anon CVS and rsync instructions at:
76
77 http://www.openssl.org/source/repos.html
78
79 Make or download a restricted tarball from ftp://ftp.openssl.org/snapshot/
80
81 If required set the environment variable FIPSDIR to an appropriate location
82 to install the test module. If cross compiling set other environment
83 variables too.
84
85 In this restricted tarball on a Linux or U*ix like system run:
86
87 ./config
88 make
89 make install
90
91 On Windows from a VC++ environment do:
92
93 ms\do_fips
94
95 This will build and install the test module and some associated files.
96
97 Now download the latest version of the OpenSSL 1.0.1 branch from either a
98 snapshot or preferably CVS. For Linux do:
99
100 ./config fips [other args]
101 make
102
103 For Windows:
104
105 perl Configure VC-WIN32 fips [other args]
106 ms\do_nasm
107 nmake -f ms\ntdll.mak
108
109 (or ms\nt.mak for a static build).
110
111 Where [other args] can be any other arguments you use for an OpenSSL build
112 such as "shared" or "zlib".
113
114 This will build the fips capable OpenSSL and link it to the test module. You
115 can now try linking and testing applications against the FIPS capable OpenSSL.
116
117 Please report any problems to either the openssl-dev mailing list or directly
118 to me steve@openssl.org . Check the mailing lists regularly to avoid duplicate
119 reports.
120
121 Known issues:
122
123 Code needs extensively reviewing to ensure it builds correctly on 
124 supported platforms and is compliant with FIPS 140-2.
125 The "FIPS capable OpenSSL" is still largely untested, it builds and runs
126 some simple tests OK on some systems but needs far more "real world" testing.