Skip to content

Commit

Permalink
ASM, SP, C regeneration
Browse files Browse the repository at this point in the history
Fix spaces at start of copyright line in .asm files.
Changed generation of X25519 and Ed448 code to better match changes
already in C code. Fixed formatting in places.
  • Loading branch information
SparkiDev committed Jan 28, 2025
1 parent c48ba69 commit f8bc819
Show file tree
Hide file tree
Showing 7 changed files with 377 additions and 361 deletions.
2 changes: 1 addition & 1 deletion wolfcrypt/src/aes_gcm_asm.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; /* aes_gcm_asm.asm */
; /*
; * Copyright (C) 2006-2025 wolfSSL Inc.
; * Copyright (C) 2006-2025 wolfSSL Inc.
; *
; * This file is part of wolfSSL.
; *
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/aes_xts_asm.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; /* aes_xts_asm.asm */
; /*
; * Copyright (C) 2006-2025 wolfSSL Inc.
; * Copyright (C) 2006-2025 wolfSSL Inc.
; *
; * This file is part of wolfSSL.
; *
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/chacha_asm.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; /* chacha_asm.asm */
; /*
; * Copyright (C) 2006-2025 wolfSSL Inc.
; * Copyright (C) 2006-2025 wolfSSL Inc.
; *
; * This file is part of wolfSSL.
; *
Expand Down
8 changes: 4 additions & 4 deletions wolfcrypt/src/fe_x25519_128.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,29 +120,29 @@ void fe_tobytes(unsigned char *out, const fe n)
out[ 3] = (((byte)((in[0] >> 24) )) );
out[ 4] = (((byte)((in[0] >> 32) )) );
out[ 5] = (((byte)((in[0] >> 40) )) );
out[ 6] = (byte)((((byte)((in[0] >> 48) & 0x07)))
out[ 6] = (byte)((((byte)((in[0] >> 48) & 0x07)) )
| (((byte)((in[1] ) & 0x1f)) << 3));
out[ 7] = (((byte)((in[1] >> 5) )) );
out[ 8] = (((byte)((in[1] >> 13) )) );
out[ 9] = (((byte)((in[1] >> 21) )) );
out[10] = (((byte)((in[1] >> 29) )) );
out[11] = (((byte)((in[1] >> 37) )) );
out[12] = (byte)((((byte)((in[1] >> 45) & 0x3f)))
out[12] = (byte)((((byte)((in[1] >> 45) & 0x3f)) )
| (((byte)((in[2] ) & 0x03)) << 6));
out[13] = (((byte)((in[2] >> 2) )) );
out[14] = (((byte)((in[2] >> 10) )) );
out[15] = (((byte)((in[2] >> 18) )) );
out[16] = (((byte)((in[2] >> 26) )) );
out[17] = (((byte)((in[2] >> 34) )) );
out[18] = (((byte)((in[2] >> 42) )) );
out[19] = (byte)((((byte)((in[2] >> 50) & 0x01)))
out[19] = (byte)((((byte)((in[2] >> 50) & 0x01)) )
| (((byte)((in[3] ) & 0x7f)) << 1));
out[20] = (((byte)((in[3] >> 7) )) );
out[21] = (((byte)((in[3] >> 15) )) );
out[22] = (((byte)((in[3] >> 23) )) );
out[23] = (((byte)((in[3] >> 31) )) );
out[24] = (((byte)((in[3] >> 39) )) );
out[25] = (byte)((((byte)((in[3] >> 47) & 0x0f)))
out[25] = (byte)((((byte)((in[3] >> 47) & 0x0f)) )
| (((byte)((in[4] ) & 0x0f)) << 4));
out[26] = (((byte)((in[4] >> 4) )) );
out[27] = (((byte)((in[4] >> 12) )) );
Expand Down
720 changes: 368 additions & 352 deletions wolfcrypt/src/ge_448.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wolfcrypt/src/poly1305_asm.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; /* poly1305_asm.asm */
; /*
; * Copyright (C) 2006-2025 wolfSSL Inc.
; * Copyright (C) 2006-2025 wolfSSL Inc.
; *
; * This file is part of wolfSSL.
; *
Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/src/sp_x86_64_asm.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; /* sp_x86_64_asm.asm */
; /*
; * Copyright (C) 2006-2025 wolfSSL Inc.
; * Copyright (C) 2006-2025 wolfSSL Inc.
; *
; * This file is part of wolfSSL.
; *
Expand Down

0 comments on commit f8bc819

Please sign in to comment.