Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: x/crypto/cryptobyte: add ReadUint32LengthPrefixed #64391

Open
AGWA opened this issue Nov 26, 2023 · 2 comments
Open

proposal: x/crypto/cryptobyte: add ReadUint32LengthPrefixed #64391

AGWA opened this issue Nov 26, 2023 · 2 comments
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Milestone

Comments

@AGWA
Copy link

AGWA commented Nov 26, 2023

Proposal Details

cryptobyte.String has ReadUintNLengthPrefixed for N 8, 16, and 24, but not 32, despite Builder having AddUint32LengthPrefixed.

ReadUint32LengthPrefixed would be useful for parsing SSH protocol messages, which use uint32-prefixed strings.

I propose adding:

func (s *String) ReadUint32LengthPrefixed(out *String) bool

cc @rolandshoemaker @FiloSottile

@AGWA AGWA added the Proposal label Nov 26, 2023
@gopherbot gopherbot added this to the Proposal milestone Nov 26, 2023
@FiloSottile
Copy link
Contributor

FiloSottile commented Nov 26, 2023 via email

@AlexanderYastrebov
Copy link
Contributor

AlexanderYastrebov commented Nov 27, 2023

I implemented it two years ago https://go-review.googlesource.com/c/crypto/+/360095 but it was never reviewed.
Somehow original issue link #49227 is not working atm.

@ianlancetaylor ianlancetaylor added the Proposal-Crypto Proposal related to crypto packages or other security issues label Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Projects
Status: Incoming
Development

No branches or pull requests

5 participants