]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: turris-mox-rwtm: support ECDSA signatures via debugfs
authorMarek Behún <marek.behun@nic.cz>
Mon, 1 Jun 2020 21:00:49 +0000 (23:00 +0200)
committerGregory CLEMENT <gregory.clement@bootlin.com>
Sat, 18 Jul 2020 20:35:01 +0000 (22:35 +0200)
commitbbd63a87f144d63c5aac27726bf4d2109a1f5d19
tree33e8604774cc59176be43c2632ff8f9582395664
parent74a27a5f5a99e6b5adfd790053b6cccac3270c76
firmware: turris-mox-rwtm: support ECDSA signatures via debugfs

The firmware on Turris MOX secure processor offers signing messages
with ECDSA private key stored in protected OTP memory.

The optimal solution would be to register an akcipher provider via
kernel's crypto API, but crypto API does not yet support accessing
akcipher API from userspace (and probably won't for some time, see
https://www.spinics.net/lists/linux-crypto/msg38388.html).

At first I tried to put this via standard sysfs API, but the way I
designed it is not compatible with sysfs's standard "one file per
attribute".

This patch therefore adds support for accessing this signature
generation mechanism via debugfs. Since CZ.NIC's Turris MOX is the only
user of this module, the potential future change to akcipher API should
not cause problems, since we can just change our userspace software then.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
drivers/firmware/turris-mox-rwtm.c