|
SharkSSL™ Embedded SSL/TLS Stack
|
These IAR Thumb-2 sources target little-endian Cortex-M3, Cortex-M4, and Cortex-M7. Assemble .s files with the IAR assembler and pass the same SharkSSL feature definitions to assembly and C. They are not GNU as files.
Select exactly one of SharkSslBigInt_M3.s (Cortex-M3) or SharkSslBigInt_M4.s (Cortex-M4/M7 with DSP instructions). They export the same symbols and must not be linked together. Keep SharkSslBigInt.c in the normal SharkSSL build and set:
SharkSslX25519_M4.s supplies the dedicated 8x32 field arithmetic and ladder for Cortex-M4/M7 with DSP instructions. It is separate from the generic BigInt assembly choice. Keep SharkSslBigInt.c in the build and set:
The X25519 assembly backend is not available for Cortex-M3. Use the corresponding C path when this assembly is not selected.
SharkSslCrypto_M3.s supplies the Thumb-2 implementations. Keep SharkSslCrypto.c in the build. Its two routines have separate feature guards; enable the algorithms and optimizations needed:
No GHASH or combined GCM assembly backend is supplied in this directory.
Define B_LITTLE_ENDIAN for these backends. Set SHARKSSL_UNALIGNED_ACCESS only if the target, memory regions, and integration permit such accesses. Choose cipher suites, code-size options, and a secure RNG in the active SharkSSL configuration.
These hand-written Thumb-2 routines use processor-specific arithmetic and register scheduling to target lower cryptographic processing cost on small MCUs. The potential benefit is more CPU time available for application tasks without changing SharkSSL's public APIs. Performance depends on the selected routines, compiler settings, and target MCU. Measure with the intended compiler and Cortex-M processor; ARM64 and x86 results do not apply here.