disable setupRefreshPlanchet C crypto worker call

This commit is contained in:
Florian Dold 2022-02-21 16:17:59 +01:00
parent 5c93f15157
commit 5fbe82b374
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 3 additions and 19 deletions

View File

@ -608,6 +608,7 @@ export function hashCoinEv(
return hashContext.finish();
}
const logger = new Logger("talerCrypto.ts");
export function hashCoinEvInner(
@ -682,24 +683,6 @@ export interface FreshCoin {
bks: Uint8Array;
}
// export function setupRefreshPlanchet(
// secretSeed: Uint8Array,
// coinNumber: number,
// ): FreshCoin {
// const info = stringToBytes("taler-coin-derivation");
// const saltArrBuf = new ArrayBuffer(4);
// const salt = new Uint8Array(saltArrBuf);
// const saltDataView = new DataView(saltArrBuf);
// saltDataView.setUint32(0, coinNumber);
// const out = kdf(64, secretSeed, salt, info);
// const coinPriv = out.slice(0, 32);
// const bks = out.slice(32, 64);
// return {
// bks,
// coinPriv,
// coinPub: eddsaGetPublic(coinPriv),
// };
// }
function bufferForUint32(n: number): Uint8Array {
const arrBuf = new ArrayBuffer(4);

View File

@ -557,7 +557,8 @@ export class CryptoImplementation {
let coinPub: Uint8Array;
let coinPriv: Uint8Array;
let blindingFactor: Uint8Array;
if (this.primitiveWorker) {
// disabled while not implemented in the C code
if (0 && this.primitiveWorker) {
const r = await this.primitiveWorker.setupRefreshPlanchet({
transfer_secret: encodeCrock(transferSecret),
coin_index: coinIndex,