zig/lib/std
Naoki MATSUMOTO cd4865d88c
std.crypto.sign.ecdsa: accepts unusual parameters like EcdsaP384Sha256 (#13302)
This commit accepts unusual parameters like EcdsaP384Sha256.
Some certifictes(below certs are in /etc/ssl/certs/ca-certificates.crt on Ubuntu 22.04) use EcdsaP384Sha256 to sign itself.
- Subject: C=GR, L=Athens, O=Hellenic Academic and Research Institutions Cert. Authority, CN=Hellenic Academic and Research Institutions ECC RootCA 2015
- Subject: C=US, ST=Texas, L=Houston, O=SSL Corporation, CN=SSL.com EV Root Certification Authority ECC
- Subject: C=US, ST=Texas, L=Houston, O=SSL Corporation, CN=SSL.com Root Certification Authority ECC

In verify(), hash array `h` is allocated to be larger than the scalar.encoded_length.
The array is regarded as big-endian.
Hash values are filled in the back of the array and the rest bytes in front are filled with zero.

In sign(), the hash array is allocated and filled as same as verify().
In deterministicScalar(), hash bytes are insufficient to generate `k`
To generate `k` without narrowing its value range,
this commit uses algorithm stage h. in  "Section 3.2 Generation of k" in RFC6979.
2022-10-26 13:18:06 +02:00
..
atomic tests: Enable PPC64LE as a test target 2022-10-13 12:53:20 -07:00
build Merge pull request #13218 from Luukdegram/fix-emulatable-step 2022-10-19 08:36:14 +02:00
c Support compiling for the android NDK (#13245) 2022-10-21 18:32:56 -04:00
compress all: rename @maximum to @max and @minimum to @min 2022-10-18 14:15:16 +03:00
crypto std.crypto.sign.ecdsa: accepts unusual parameters like EcdsaP384Sha256 (#13302) 2022-10-26 13:18:06 +02:00
dwarf
event enable event loop for ios, tvos, and watchos 2022-10-13 13:33:45 +02:00
fmt stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
fs Fix compile error in Dir.deleteTreeMinStackSize and add test 2022-10-14 14:48:23 -04:00
hash stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
heap remove pointless discards 2022-09-12 18:13:24 -07:00
http std.http: fix typo 2022-10-06 21:22:20 +03:00
io Sema: add error for non-comptime param in comptime func 2022-08-27 11:17:48 +03:00
json std.json: Fix parsing of large numbers 2022-07-23 13:52:16 +03:00
math Merge branch 'amdgpu-improvements' of https://github.com/Snektron/zig into Snektron-amdgpu-improvements 2022-10-15 10:36:10 -07:00
mem std: Replace use of stage1 function pointers 2022-09-29 21:45:30 +03:00
meta
net AstGen: fix loop control flow applying to wrong loop 2022-07-13 16:10:41 -07:00
os UEFI: Querying memory map size with no allocation 2022-10-21 12:17:41 +02:00
rand std.rand: make weightedIndex proportions param a const slice 2022-08-30 13:02:17 +03:00
target add m68k target CPU features 2022-10-20 09:21:06 -07:00
testing Move sys_can_stack_trace from GPA to std.debug so that it can be re-used as needed 2022-06-25 21:27:56 -07:00
Thread Fix for #13163: DefaultRwLock accumulates write-waiters, eventually fails to write lock (#13180) 2022-10-17 18:15:15 -05:00
time
tz
unicode
valgrind std.valgrind.callgrind: fix string type 2022-08-22 13:55:00 +03:00
x std.fmt: require specifier for unwrapping ?T and E!T 2022-07-26 11:25:49 -07:00
zig std.zig.system.NativePaths: avoid calling std.os.getenv on Windows 2022-10-18 16:52:43 -07:00
array_hash_map.zig std: fix memory leak in ArrayHashMap (#13001) 2022-10-03 22:57:53 -04:00
array_list.zig std: remove deprecated API for the upcoming release 2022-09-16 14:46:53 -04:00
ascii.zig fix: comments 2022-08-17 20:08:13 +02:00
atomic.zig
base64.zig std: Replace use of stage1 function pointers 2022-09-29 21:45:30 +03:00
bit_set.zig fix(text): hyphenate "runtime" adjectives 2022-10-05 21:33:42 +02:00
bounded_array.zig AstGen: detect declarations shadowing locals 2022-08-16 20:35:03 +03:00
buf_map.zig
buf_set.zig
build.zig build: added unwind_tables to LibExeObjStep 2022-10-19 13:24:06 -04:00
builtin.zig builtin.zig: Do not overwrite error frames when trace full 2022-10-21 12:40:33 -07:00
c.zig std: Replace use of stage1 function pointers 2022-09-29 21:45:30 +03:00
child_process.zig std.ChildProcess: correct fn getUserInfo pkg in setUserName 2022-10-03 12:59:47 +03:00
coff.zig coff: add import table definitions 2022-08-31 19:30:51 +02:00
compress.zig stage2: small fixes + adjustments to std tests 2022-06-11 23:49:33 +03:00
comptime_string_map.zig
crypto.zig crypto: add the Xoodoo permutation, prepare for Gimli deprecation (#11866) 2022-07-01 13:18:08 +02:00
cstr.zig
debug.zig builtin.zig: Do not overwrite error frames when trace full 2022-10-21 12:40:33 -07:00
dwarf.zig std.debug: DWARFv5 fixes 2022-08-23 21:11:02 -07:00
dynamic_library.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
elf.zig Sema: add error for non-comptime param in comptime func 2022-08-27 11:17:48 +03:00
enums.zig fix(text): hyphenate "comptime" adjectives 2022-10-05 21:19:30 +02:00
event.zig
fifo.zig
fmt.zig fmt: fix f80 hex formatting 2022-10-25 09:04:04 -07:00
fs.zig os.copy_file_range: save a syscall for most operations 2022-10-18 12:57:21 -04:00
hash.zig
hash_map.zig std: remove deprecated API for the upcoming release 2022-09-16 14:46:53 -04:00
heap.zig all: rename @maximum to @max and @minimum to @min 2022-10-18 14:15:16 +03:00
http.zig
io.zig libstd: use windows.GetStdHandle() with stage2_x86_64 backend for now 2022-09-07 22:42:57 +02:00
json.zig Sema: check pointer qualifiers before implicit cast 2022-09-20 00:50:13 +03:00
leb128.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
linked_list.zig chore: Remove unused constants 2022-09-11 23:18:43 -04:00
log.zig std: remove deprecated API for the upcoming release 2022-09-16 14:46:53 -04:00
macho.zig macho: rewrite how we allocate space in incremental context 2022-09-18 10:00:04 +02:00
math.zig Merge pull request #12918 from jacobly0/math-cast-comptime-int 2022-10-15 12:11:55 -04:00
mem.zig Sema: check pointer qualifiers before implicit cast 2022-09-20 00:50:13 +03:00
meta.zig Simplify code in std.meta.isTag 2022-10-16 11:35:27 -04:00
multi_array_list.zig std: remove deprecated API for the upcoming release 2022-09-16 14:46:53 -04:00
net.zig std.mem: add first method to SplitIterator and SplitBackwardsIterator 2022-07-25 22:04:30 +03:00
once.zig
os.zig all: rename @maximum to @max and @minimum to @min 2022-10-18 14:15:16 +03:00
packed_int_array.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
pdb.zig libstd: fix off-by-one error in def of ProcSym in pdb 2022-08-17 16:36:02 -04:00
priority_dequeue.zig std: remove deprecated API for the upcoming release 2022-09-16 14:46:53 -04:00
priority_queue.zig std: remove deprecated API for the upcoming release 2022-09-16 14:46:53 -04:00
process.zig Move std.testing.zig_exe_path into build options 2022-09-14 14:42:58 -07:00
Progress.zig Revert recent std.Progress implementation changes 2022-10-18 18:53:44 -07:00
rand.zig std: Replace use of stage1 function pointers 2022-09-29 21:45:30 +03:00
segmented_list.zig std.SegmentedList: fix compilation error 2022-10-13 13:57:20 +02:00
SemanticVersion.zig std.mem: add first method to SplitIterator and SplitBackwardsIterator 2022-07-25 22:04:30 +03:00
simd.zig all: rename @maximum to @max and @minimum to @min 2022-10-18 14:15:16 +03:00
sort.zig
start.zig coff: re-enable default entrypoint for Windows 2022-09-07 22:42:55 +02:00
start_windows_tls.zig
std.zig
target.zig add m68k target CPU features 2022-10-20 09:21:06 -07:00
testing.zig fix(text): hyphenation and other fixes 2022-10-05 21:19:10 +02:00
Thread.zig remove pointless discards 2022-09-12 18:13:24 -07:00
time.zig math: make cast return optional instead of an error 2022-05-27 16:43:33 -04:00
treap.zig
tz.zig std.tz: fix function returning pointer to local variable 2022-06-17 21:04:21 +03:00
unicode.zig Sema: handle tuple and anon_struct in resolveTypeFully 2022-06-11 11:02:56 +03:00
valgrind.zig
wasm.zig
x.zig stage2: small fixes + adjustments to std tests 2022-06-11 23:49:33 +03:00
zig.zig validate number literals in AstGen 2022-09-13 20:26:04 -04:00