Skip to content

Commit a9fb6db

Browse files
Update to latest BearSSL code. (#5669)
1 parent 5e4c2e9 commit a9fb6db

File tree

5 files changed

+63
-3
lines changed

5 files changed

+63
-3
lines changed

Diff for: tools/sdk/include/bearssl/bearssl_ec.h

+60
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,42 @@ extern const br_ec_impl br_ec_p256_m15;
451451
*/
452452
extern const br_ec_impl br_ec_p256_m31;
453453

454+
/**
455+
* \brief EC implementation "m62" (specialised code) for P-256.
456+
*
457+
* This implementation uses custom code relying on multiplication of
458+
* integers up to 64 bits, with a 128-bit result. This implementation is
459+
* defined only on platforms that offer the 64x64->128 multiplication
460+
* support; use `br_ec_p256_m62_get()` to dynamically obtain a pointer
461+
* to that implementation.
462+
*/
463+
extern const br_ec_impl br_ec_p256_m62;
464+
465+
/**
466+
* \brief Get the "m62" implementation of P-256, if available.
467+
*
468+
* \return the implementation, or 0.
469+
*/
470+
const br_ec_impl *br_ec_p256_m62_get(void);
471+
472+
/**
473+
* \brief EC implementation "m64" (specialised code) for P-256.
474+
*
475+
* This implementation uses custom code relying on multiplication of
476+
* integers up to 64 bits, with a 128-bit result. This implementation is
477+
* defined only on platforms that offer the 64x64->128 multiplication
478+
* support; use `br_ec_p256_m64_get()` to dynamically obtain a pointer
479+
* to that implementation.
480+
*/
481+
extern const br_ec_impl br_ec_p256_m64;
482+
483+
/**
484+
* \brief Get the "m64" implementation of P-256, if available.
485+
*
486+
* \return the implementation, or 0.
487+
*/
488+
const br_ec_impl *br_ec_p256_m64_get(void);
489+
454490
/**
455491
* \brief EC implementation "i15" (generic code) for Curve25519.
456492
*
@@ -531,6 +567,30 @@ extern const br_ec_impl br_ec_c25519_m62;
531567
*/
532568
const br_ec_impl *br_ec_c25519_m62_get(void);
533569

570+
/**
571+
* \brief EC implementation "m64" (specialised code) for Curve25519.
572+
*
573+
* This implementation uses custom code relying on multiplication of
574+
* integers up to 64 bits, with a 128-bit result. This implementation is
575+
* defined only on platforms that offer the 64x64->128 multiplication
576+
* support; use `br_ec_c25519_m64_get()` to dynamically obtain a pointer
577+
* to that implementation. Due to the specificities of the curve
578+
* definition, the following applies:
579+
*
580+
* - `muladd()` is not implemented (the function returns 0 systematically).
581+
* - `order()` returns 2^255-1, since the point multiplication algorithm
582+
* accepts any 32-bit integer as input (it clears the top bit and low
583+
* three bits systematically).
584+
*/
585+
extern const br_ec_impl br_ec_c25519_m64;
586+
587+
/**
588+
* \brief Get the "m64" implementation of Curve25519, if available.
589+
*
590+
* \return the implementation, or 0.
591+
*/
592+
const br_ec_impl *br_ec_c25519_m64_get(void);
593+
534594
/**
535595
* \brief Aggregate EC implementation "m15".
536596
*

Diff for: tools/sdk/include/bearssl/bearssl_git.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Do not edit -- Automatically generated by tools/sdk/ssl/bearssl/Makefile
2-
#define BEARSSL_GIT 79edbc8
2+
#define BEARSSL_GIT 6778687

Diff for: tools/sdk/lib/libbearssl.a

10.8 KB
Binary file not shown.

Diff for: tools/sdk/ssl/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
VER_H=../include/bearssl/bearssl_git.h
44

55
all T0 clean: bearssl/README.txt
6-
PATH=$(PATH):$(PWD)/../../xtensa-lx106-elf/bin/ && cd bearssl && make CONF=esp8266 $@
6+
PATH="$(PATH):$(PWD)/../../xtensa-lx106-elf/bin/" && cd bearssl && make CONF=esp8266 $@
77

88
install: all version-header
99
cp bearssl/esp8266/libbearssl.a ../lib/.

0 commit comments

Comments
 (0)