11// SPDX-License-Identifier: MIT
22//
3- // Copyright (C) 2020-2022 Daniel Bourdrez. All Rights Reserved.
3+ // Copyright (C) 2020-2025 Daniel Bourdrez. All Rights Reserved.
44//
55// This source code is licensed under the MIT license found in the
66// LICENSE file in the root directory of this source tree or at
@@ -74,7 +74,7 @@ func (c *Client) buildPRK(evaluation *ecc.Element) []byte {
7474
7575// ClientRegistrationInitOptions enables setting internal client values for the client registration.
7676type ClientRegistrationInitOptions struct {
77- // OPRFBlind: optional
77+ // OPRFBlind: optional.
7878 OPRFBlind * ecc.Scalar
7979}
8080
@@ -100,11 +100,11 @@ func (c *Client) RegistrationInit(
100100
101101// ClientRegistrationFinalizeOptions enables setting optional client values for the client registration.
102102type ClientRegistrationFinalizeOptions struct {
103- // ClientIdentity: optional
103+ // ClientIdentity: optional.
104104 ClientIdentity []byte
105- // ServerIdentity: optional
105+ // ServerIdentity: optional.
106106 ServerIdentity []byte
107- // EnvelopeNonce : optional
107+ // EnvelopeNonce : optional.
108108 EnvelopeNonce []byte
109109}
110110
@@ -141,24 +141,24 @@ func (c *Client) RegistrationFinalize(
141141 }, exportKey
142142}
143143
144- // GenerateKE1Options enables setting optional values for the session, which default to secure random values if not
144+ // GenerateKE1Options enable setting optional values for the session, which default to secure random values if not
145145// set.
146146type GenerateKE1Options struct {
147- // Blind : optional
148- Blind * ecc.Scalar
149- // KeyShareSeed: optional
147+ // OPRFBlind : optional.
148+ OPRFBlind * ecc.Scalar
149+ // KeyShareSeed: optional.
150150 KeyShareSeed []byte
151- // Nonce : optional
152- Nonce []byte
153- // NonceLength : optional
154- NonceLength uint
151+ // AKENonce : optional.
152+ AKENonce []byte
153+ // AKENonceLength : optional, overrides the default length of the nonce to be created if no nonce is provided.
154+ AKENonceLength uint
155155}
156156
157157func (c GenerateKE1Options ) get () (* ecc.Scalar , ake.Options ) {
158- return c .Blind , ake.Options {
158+ return c .OPRFBlind , ake.Options {
159159 KeyShareSeed : c .KeyShareSeed ,
160- Nonce : c .Nonce ,
161- NonceLength : c .NonceLength ,
160+ Nonce : c .AKENonce ,
161+ NonceLength : c .AKENonceLength ,
162162 }
163163}
164164
@@ -185,11 +185,11 @@ func (c *Client) GenerateKE1(password []byte, options ...GenerateKE1Options) *me
185185 return ke1
186186}
187187
188- // GenerateKE3Options enables setting optional client values for the client registration.
188+ // GenerateKE3Options enable setting optional client values for the client registration.
189189type GenerateKE3Options struct {
190- // ClientIdentity: optional
190+ // ClientIdentity: optional.
191191 ClientIdentity []byte
192- // ServerIdentity: optional
192+ // ServerIdentity: optional.
193193 ServerIdentity []byte
194194}
195195
0 commit comments