Skip to content

Commit

Permalink
spelling: threshold
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
  • Loading branch information
jsoref authored and armfazh committed Sep 6, 2023
1 parent 82b7495 commit 171c418
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tss/rsa/keyshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (kshare *KeyShare) MarshalBinary() ([]byte, error) {
}

if kshare.Threshold > math.MaxUint16 {
return nil, fmt.Errorf("rsa_threshold: keyshare marshall: Threhsold is too big to fit in a uint16")
return nil, fmt.Errorf("rsa_threshold: keyshare marshall: Threshold is too big to fit in a uint16")
}

if kshare.Index > math.MaxUint16 {
Expand Down Expand Up @@ -105,7 +105,7 @@ func (kshare *KeyShare) UnmarshalBinary(data []byte) error {
// | Players: uint16 | Threshold: uint16 | Index: uint16 | siLen: uint16 | si: []byte | twoDeltaSiNil: bool | twoDeltaSiLen: uint16 | twoDeltaSi: []byte |
// with all values in big-endian.
if len(data) < 6 {
return fmt.Errorf("rsa_threshold: keyshare unmarshalKeyShareTest failed: data length was too short for reading Players, Threashold, Index")
return fmt.Errorf("rsa_threshold: keyshare unmarshalKeyShareTest failed: data length was too short for reading Players, Threshold, Index")
}

players := binary.BigEndian.Uint16(data[0:2])
Expand Down

0 comments on commit 171c418

Please sign in to comment.