Skip to content

Commit

Permalink
revert some renamings
Browse files Browse the repository at this point in the history
  • Loading branch information
jbr committed Sep 30, 2022
1 parent ac24e95 commit 20ff3d2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/prio3/src/prio3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class Prio3<Measurement> implements Prio3Vdaf<Measurement> {
this.shares
);

const outboundMessage = this.encodePrepareState(
const outboundMessage = this.encodePrepareMessage(
verifierShare,
shareJointRandSeed
);
Expand All @@ -176,7 +176,7 @@ export class Prio3<Measurement> implements Prio3Vdaf<Measurement> {
};
}

const { verifier, jointRand } = this.decodePrepareState(inbound);
const { verifier, jointRand } = this.decodePrepareMessage(inbound);

const jointRandEquality =
(jointRand &&
Expand All @@ -191,7 +191,7 @@ export class Prio3<Measurement> implements Prio3Vdaf<Measurement> {
return { outputShare: prepareState.outputShare };
}

prepSharesToPrepareState(
prepSharesToPrepareMessage(
_aggParam: AggregationParameter,
encodedPrepShares: Buffer[]
): Buffer {
Expand All @@ -200,7 +200,7 @@ export class Prio3<Measurement> implements Prio3Vdaf<Measurement> {

const verifier = encodedPrepShares.reduce((verifier, encodedPrepState) => {
const { verifier: shareVerifier, jointRand: shareJointRand } =
this.decodePrepareState(encodedPrepState);
this.decodePrepareMessage(encodedPrepState);

if (flp.jointRandLen > 0 && shareJointRand) {
xorInPlace(jointRandCheck, shareJointRand);
Expand All @@ -209,7 +209,7 @@ export class Prio3<Measurement> implements Prio3Vdaf<Measurement> {
return field.vecAdd(verifier, shareVerifier);
}, fill(flp.verifierLen, 0n));

return this.encodePrepareState(verifier, jointRandCheck);
return this.encodePrepareMessage(verifier, jointRandCheck);
}

outputSharesToAggregatorShare(
Expand Down Expand Up @@ -242,7 +242,7 @@ export class Prio3<Measurement> implements Prio3Vdaf<Measurement> {
: await this.decodeHelperShare(aggregatorId, encoded);
}

private decodePrepareState(input: Buffer): {
private decodePrepareMessage(input: Buffer): {
verifier: bigint[];
jointRand: Buffer | null;
} {
Expand All @@ -267,7 +267,7 @@ export class Prio3<Measurement> implements Prio3Vdaf<Measurement> {
return { verifier, jointRand };
}

private encodePrepareState(
private encodePrepareMessage(
verifier: bigint[],
jointRandShare: Buffer | null
): Buffer {
Expand Down

0 comments on commit 20ff3d2

Please sign in to comment.