@mfalkvidd thanks again for your thoughts.
I wasn't having much luck reducing things, so came across another cunning plan. Initial info here https://bigdanzblog.wordpress.com/2014/10/23/installing-the-optiboot-loader-on-an-arudino-nano-to-fix-the-watch-dog-timer-wdt-issue
Turn Nano into Uno to free-up more memory (load optiboot bootloader)
- Use Uno as programmer – see here: https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader
- Upload Examples/AudrinoISP sketch to Uno
- Select type of Board Nano needs to be e.g. Adruino/Genuino Uno
- Select Tools/Burn Bootloader – this loads Uno bootloader into Nano. Behind the scenes, this bootloader is C:\Program Files (x86)\Arduino\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex (at least for my IDE setup)
Nano now has 32,256 bytes free instead of 30,720. Plenty enough to store the 31,070 my MQTT/SoftSPI/SigningSoft gateway needs. And after re-running SecurityPersonalizer (because bootloading cleared EEPROM), Signing is now working:
Signing backend: ATSHA204Soft
SHA256: EBB61F82572BBB42676ADA13705C918B05588F926D3E15F58800000000000000
Transmittng nonce
send: 46-46-0-0 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:EBB61F82572BBB42676ADA13705C918B05588F926D3E15F588
Signature in message: 0194DB798EFE5B3543EEA0381D7817591E6E5A279A28FC13
Message to process: 002E0E00020131
Current nonce: EBB61F82572BBB42676ADA13705C918B05588F926D3E15F588AAAAAAAAAAAAAA
HMAC: A794DB798EFE5B3543EEA0381D7817591E6E5A279A28FC13A7716480D1820181
Signature OK
read: 0-0-46 s=1,c=0,t=2,pt=0,l=1,sg=0:1
Fantastic!