Skip to content

Commit bdcfb62

Browse files
committed
fix(bls): ProofOfPossession double wrapping
1 parent c5a5632 commit bdcfb62

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/crypto/src/lib/crypto.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ export const combineSignatureShares = async (
135135
shares: BlsSignatureShare[]
136136
): Promise<string> => {
137137
const signature = await doCombineSignatureShares(shares);
138+
const hex = Buffer.from(signature).toString('hex');
139+
140+
if (hex.length !== 192) {
141+
throw new Error(
142+
`❌ Invalid signature length: ${hex.length}. Expected 192.`
143+
);
144+
}
138145

139146
return Buffer.from(signature).toString('hex');
140147
};

0 commit comments

Comments
 (0)