aboutsummaryrefslogtreecommitdiff
path: root/cryptobyte/string.go
AgeCommit message (Collapse)Author
2023-09-07cryptobyte: add uint48 methodsDaniel Mangum
Adds uint48 methods for cryptobyte.Builder and cryptobyte.String. Supporting 48-bit unsigned integers is useful for working with protocols that use them for sequence numbers, such as DTLS. Fixes golang/go#61275 Change-Id: Ibe49422d37644b9212b28b123dc5e01850f7b05b GitHub-Last-Rev: 11b388c240109c8f4ac23880645c901ce6d2f093 GitHub-Pull-Request: golang/crypto#265 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/508675 Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com> Run-TryBot: Roland Shoemaker <roland@golang.org> Auto-Submit: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-24cryptobyte: add ReadUint64 and AddUint64hopehook
Fixes golang/go#53481. Change-Id: Ic00eef498d1d3b5b0ca5c9c526fac7c26de30cf2 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/421014 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Run-TryBot: hopehook <hopehook@qq.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
2020-01-28cryptobyte: fix panic due to malformed ASN.1 inputs on 32-bit archsFilippo Valsorda
When int is 32 bits wide (on 32-bit architectures like 386 and arm), an overflow could occur, causing a panic, due to malformed ASN.1 being passed to any of the ASN1 methods of String. Tested on linux/386 and darwin/amd64. This fixes CVE-2020-7919 and was found thanks to the Project Wycheproof test vectors. Change-Id: I8c9696a8bfad1b40ec877cd740dba3467d66ab54 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/645211 Reviewed-by: Katie Hockman <katiehockman@google.com> Reviewed-by: Adam Langley <agl@google.com> Reviewed-on: https://go-review.googlesource.com/c/crypto/+/216677 Run-TryBot: Katie Hockman <katie@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-04-10cryptobyte: minor documentation fixAndrey Mirtchovski
This change fixes a minor misspelling in the documentation for ReadBytes. Change-Id: Ia1cfedfce11844c4d901b9aeed52065f3749dfa2 GitHub-Last-Rev: d1560b97807871c356d1b704d4879b1cf94a3fd8 GitHub-Pull-Request: golang/crypto#40 Reviewed-on: https://go-review.googlesource.com/106116 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-09-12cryptobyte: various API and documentation updates.Adam Langley
Change-Id: I83236ecea0774d4ec49e978a391eb3ff5dabdeb6 Reviewed-on: https://go-review.googlesource.com/57810 Reviewed-by: Martin Kreichgauer <martinkr@google.com> Reviewed-by: Adam Langley <agl@golang.org>
2017-04-07x/crypto/*: add import commentAndreas Auernhammer
Add import comment for blake2b, blake2s, chacha20poly1305 and cryptobyte. Change-Id: I4703b5cd669e43a5d81422b2ded8b8f54eee5f9b Reviewed-on: https://go-review.googlesource.com/39952 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2017-03-07cryptobyte: new package.Martin Kreichgauer
cryptobyte is a helper library for building and parsing byte strings, specifically for TLS and ASN.1. Change-Id: I046b94773f6781153784c79f3d81e6d464eaebe0 Reviewed-on: https://go-review.googlesource.com/36123 Reviewed-by: Adam Langley <agl@golang.org> Run-TryBot: Adam Langley <agl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>