linux/Documentation
Lukas Wunner a2471684da crypto: ecdsa - Move X9.62 signature size calculation into template
software_key_query() returns the maximum signature and digest size for a
given key to user space.  When it only supported RSA keys, calculating
those sizes was trivial as they were always equivalent to the key size.

However when ECDSA was added, the function grew somewhat complicated
calculations which take the ASN.1 encoding and curve into account.
This doesn't scale well and adjusting the calculations is easily
forgotten when adding support for new encodings or curves.  In fact,
when NIST P521 support was recently added, the function was initially
not amended:

https://lore.kernel.org/all/b749d5ee-c3b8-4cbd-b252-7773e4536e07@linux.ibm.com/

Introduce a ->max_size() callback to struct sig_alg and take advantage
of it to move the signature size calculations to ecdsa-x962.c.

Introduce a ->digest_size() callback to struct sig_alg and move the
maximum ECDSA digest size to ecdsa.c.  It is common across ecdsa-x962.c
and the upcoming ecdsa-p1363.c and thus inherited by both of them.

For all other algorithms, continue using the key size as maximum
signature and digest size.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2024-10-05 13:22:04 +08:00
..
ABI Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
accel drm next for 6.12-rc1 2024-09-19 10:18:15 +02:00
accounting
admin-guide x86: 2024-09-28 09:20:14 -07:00
arch more s390 updates for 6.12 merge window 2024-09-28 09:11:46 -07:00
block
bpf docs/bpf: Add missing BPF program types to docs 2024-09-12 10:56:41 -07:00
cdrom
core-api Locking changes for v6.12: 2024-09-29 08:51:30 -07:00
cpu-freq
crypto crypto: ecdsa - Move X9.62 signature size calculation into template 2024-10-05 13:22:04 +08:00
dev-tools The core clk framework is left largely untouched this time around except for 2024-09-23 15:01:48 -07:00
devicetree mhu-v3, omap2+ : fix kconfig dependencies 2024-09-29 09:53:04 -07:00
doc-guide
driver-api cxl changes for v6.12 2024-09-27 11:42:03 -07:00
fault-injection
fb
features
filesystems USB/Thunderbolt update for 6.12-rc1 2024-09-26 09:45:36 -07:00
firmware_class
firmware-guide
fpga
gpu drm next for 6.12-rc1 2024-09-19 10:18:15 +02:00
hid
hwmon hwmon: Remove devm_hwmon_device_unregister() API function 2024-09-13 07:27:36 -07:00
i2c
iio
images
infiniband
input
isdn
kbuild kbuild: doc: replace "gcc" in external module description 2024-09-24 03:07:21 +09:00
kernel-hacking
leds - Limited LED current based on thermal conditions in the QCOM flash LED driver. 2024-09-23 14:20:11 -07:00
litmus-tests
livepatch
locking
maintainer
mhi
misc-devices
mm ALong with the usual shower of singleton patches, notable patch series in 2024-09-21 07:29:05 -07:00
netlabel
netlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-09-12 17:11:24 -07:00
networking docs: tproxy: ignore non-transparent sockets in iptables 2024-09-26 13:03:01 +02:00
nvdimm
nvme Remove duplicate "and" in 'Linux NVMe docs. 2024-09-10 15:44:20 -06:00
PCI Documentation: PCI: fix typo in pci.rst 2024-09-10 15:30:42 -06:00
pcmcia
peci
power
process Kbuild updates for v6.12 2024-09-24 13:02:06 -07:00
RCU Merge branches 'context_tracking.15.08.24a', 'csd.lock.15.08.24a', 'nocb.09.09.24a', 'rcutorture.14.08.24a', 'rcustall.09.09.24a', 'srcu.12.08.24a', 'rcu.tasks.14.08.24a', 'rcu_scaling_tests.15.08.24a', 'fixes.12.08.24a' and 'misc.11.08.24a' into next.09.09.24a 2024-09-09 00:09:47 +05:30
rust Rust changes for v6.12 2024-09-25 10:25:40 -07:00
scheduler sched_ext: Provide a sysfs enable_seq counter 2024-09-23 06:53:02 -10:00
scsi
security
sound
sphinx
sphinx-static
spi
staging
target
tee
timers treewide: Fix wrong singular form of jiffies in comments 2024-09-08 20:47:40 +02:00
tools
trace
translations LoongArch changes for v6.12 2024-09-27 10:14:35 -07:00
usb
userspace-api Landlock updates for v6.12-rc1 2024-09-24 10:40:11 -07:00
virt x86: 2024-09-28 09:20:14 -07:00
w1
watchdog [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
wmi
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
dontdiff Kbuild updates for v6.12 2024-09-24 13:02:06 -07:00
index.rst
Kconfig
Makefile
memory-barriers.txt docs/memory-barriers.txt: Remove left-over references to "CACHE COHERENCY" 2024-09-13 23:56:44 -07:00
SubmittingPatches
subsystem-apis.rst