Implement TDEA algorithm tests for FIPS 140-2 validation

RESOLVED FIXED in 3.11.1

Status

NSS
Test
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: glen beasley, Assigned: glen beasley)

Tracking

3.11.1
3.11.1
Sun
Solaris

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 3 obsolete attachments)

(Assignee)

Description

12 years ago
http://csrc.nist.gov/cryptval/des/tripledesval.html
http://csrc.nist.gov/publications/nistpubs/800-20/800-20.pdf
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

12 years ago
Created attachment 205276 [details] [diff] [review]
tdea algorithm tests

I left the old implementation for FIPS 140-1 DES and Triple DES tests, once 
this patch is approved, I will remove the old code. I realize I could of 
used the old code, but this patch follows the way the AES tests was implemented, plus the FIPS 140-1 implementation did not have the MMT tests, and the Monte Carlo
implementation I believe has some bugs comparing it to NIST Special Pub 800-20.
Attachment #205276 - Flags: review?(wtchang)

Comment 2

12 years ago
Comment on attachment 205276 [details] [diff] [review]
tdea algorithm tests

r=wtc.
Attachment #205276 - Flags: review?(wtchang) → review+
(Assignee)

Comment 3

12 years ago
/cvsroot/mozilla/security/nss/cmd/fipstest/fipstest.c,v  <--  fipstest.c
new revision: 1.4; previous revision: 1.3
done
RCS file: /cvsroot/mozilla/security/nss/cmd/fipstest/tdea.sh,v
done
Checking in tdea.sh;
/cvsroot/mozilla/security/nss/cmd/fipstest/tdea.sh,v  <--  tdea.sh
initial revision: 1.1
done
(Assignee)

Comment 4

12 years ago
Created attachment 205770 [details] [diff] [review]
removal of DES and Triple DES FIPS 140-1 code
Attachment #205770 - Flags: review?(wtchang)

Comment 5

12 years ago
Comment on attachment 205770 [details] [diff] [review]
removal of DES and Triple DES FIPS 140-1 code

r=wtc.
Attachment #205770 - Flags: review?(wtchang) → review+
(Assignee)

Comment 6

12 years ago
/cvsroot/mozilla/security/nss/cmd/fipstest/fipstest.c,v  <--  fipstest.c
new revision: 1.5; previous revision: 1.4
done

Comment 7

12 years ago
Created attachment 206419 [details] [diff] [review]
Remove unnecessary output to the MCT RESPONSE file

1. Remove unused variable k.
2. Remove unnecessary copying to the tempKey buffer.
3. Remove unnecessary output to the RESPONSE file.
Attachment #206419 - Flags: review?(glen.beasley)
(Assignee)

Updated

12 years ago
Attachment #206419 - Flags: review?(glen.beasley) → review+

Comment 8

12 years ago
Created attachment 206425 [details] [diff] [review]
Remove unnecessary output to the MCT RESPONSE file, fix outputtext_2

I found that outputtext_2 was incorrect.  This broke
the NumKeys = 3 tests.
Attachment #206419 - Attachment is obsolete: true
Attachment #206425 - Flags: review?(glen.beasley)
(Assignee)

Updated

12 years ago
Attachment #206425 - Flags: review?(glen.beasley) → review+

Comment 9

12 years ago
Created attachment 206440 [details] [diff] [review]
Make MCT work

Please review and test it.  Compare the .rsp file with the
.sam file.  If it works, please go ahead and check it in.
Attachment #206425 - Attachment is obsolete: true
Attachment #206440 - Flags: review?(glen.beasley)
(Assignee)

Comment 10

12 years ago
Created attachment 206450 [details] [diff] [review]
added code to set the parity bits for the DES keys

NSS_3_11_BRANCH
Checking in fipstest.c;
/cvsroot/mozilla/security/nss/cmd/fipstest/fipstest.c,v  <--  fipstest.c
new revision: 1.3.2.4; previous revision: 1.3.2.3
done
tip:
/cvsroot/mozilla/security/nss/cmd/fipstest/fipstest.c,v  <--  fipstest.c
new revision: 1.10; previous revision: 1.9
done
Attachment #206440 - Attachment is obsolete: true
Attachment #206440 - Flags: review?(glen.beasley)

Comment 11

12 years ago
Comment on attachment 206450 [details] [diff] [review]
added code to set the parity bits for the DES keys

>+    //set the parity bits             
>+    for (k=0; k<24; k++) {
>+        key[k] = odd_parity(key[k]);
>+    }

You need to use a C comment:
      /* set the parity bits */
(Assignee)

Comment 12

12 years ago
sorry, changed to C comment and checked in.
(Assignee)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.