**Motivations:** - Consigner l'état actuel du dépôt (cron, service-login-verify, website-skeleton, userwallet, docs). - Centraliser les modifications en attente. **Root causes:** - N/A (commit groupé). **Correctifs:** - N/A. **Evolutions:** - Cron quotidien restart services : script local sans SSH, systemd (bitcoin-signet, bitcoin, APIs, dashboard, userwallet, website-skeleton) + Docker (mempool, bitcoin-signet-instance). - Feature cron-restart-services-local : documentation et règle scripts locaux / pas d'SSH. - service-login-verify : module vérification login (buildAllowedPubkeys, verifyLoginProof, nonceCache). - website-skeleton : app iframe UserWallet, config, systemd unit. - userwallet : collectSignatures, relay. - docs : DOMAINS_AND_PORTS, README, WEBSITE_SKELETON ; features userwallet-contrat-login, timeouts-backoff, service-login-verify. **Pages affectées:** - data/restart-services-cron.sh, data/restart-services.log, data/sync-utxos.log - features/cron-restart-services-local.md, features/service-login-verify.md, features/userwallet-contrat-login-reste-a-faire.md, features/userwallet-timeouts-backoff.md - docs/DOMAINS_AND_PORTS.md, docs/README.md, docs/WEBSITE_SKELETON.md - configure-nginx-proxy.sh - service-login-verify/ (src, dist, node_modules) - userwallet/src/utils/collectSignatures.ts, userwallet/src/utils/relay.ts - website-skeleton/
71 lines
2.5 KiB
TypeScript
71 lines
2.5 KiB
TypeScript
/**
|
|
|
|
SHA1 (RFC 3174), MD5 (RFC 1321) and RIPEMD160 (RFC 2286) legacy, weak hash functions.
|
|
Don't use them in a new protocol. What "weak" means:
|
|
|
|
- Collisions can be made with 2^18 effort in MD5, 2^60 in SHA1, 2^80 in RIPEMD160.
|
|
- No practical pre-image attacks (only theoretical, 2^123.4)
|
|
- HMAC seems kinda ok: https://datatracker.ietf.org/doc/html/rfc6151
|
|
* @module
|
|
*/
|
|
import { HashMD } from './_md.ts';
|
|
import { type CHash } from './utils.ts';
|
|
/** SHA1 legacy hash class. */
|
|
export declare class SHA1 extends HashMD<SHA1> {
|
|
private A;
|
|
private B;
|
|
private C;
|
|
private D;
|
|
private E;
|
|
constructor();
|
|
protected get(): [number, number, number, number, number];
|
|
protected set(A: number, B: number, C: number, D: number, E: number): void;
|
|
protected process(view: DataView, offset: number): void;
|
|
protected roundClean(): void;
|
|
destroy(): void;
|
|
}
|
|
/** SHA1 (RFC 3174) legacy hash function. It was cryptographically broken. */
|
|
export declare const sha1: CHash;
|
|
/** MD5 legacy hash class. */
|
|
export declare class MD5 extends HashMD<MD5> {
|
|
private A;
|
|
private B;
|
|
private C;
|
|
private D;
|
|
constructor();
|
|
protected get(): [number, number, number, number];
|
|
protected set(A: number, B: number, C: number, D: number): void;
|
|
protected process(view: DataView, offset: number): void;
|
|
protected roundClean(): void;
|
|
destroy(): void;
|
|
}
|
|
/**
|
|
* MD5 (RFC 1321) legacy hash function. It was cryptographically broken.
|
|
* MD5 architecture is similar to SHA1, with some differences:
|
|
* - Reduced output length: 16 bytes (128 bit) instead of 20
|
|
* - 64 rounds, instead of 80
|
|
* - Little-endian: could be faster, but will require more code
|
|
* - Non-linear index selection: huge speed-up for unroll
|
|
* - Per round constants: more memory accesses, additional speed-up for unroll
|
|
*/
|
|
export declare const md5: CHash;
|
|
export declare class RIPEMD160 extends HashMD<RIPEMD160> {
|
|
private h0;
|
|
private h1;
|
|
private h2;
|
|
private h3;
|
|
private h4;
|
|
constructor();
|
|
protected get(): [number, number, number, number, number];
|
|
protected set(h0: number, h1: number, h2: number, h3: number, h4: number): void;
|
|
protected process(view: DataView, offset: number): void;
|
|
protected roundClean(): void;
|
|
destroy(): void;
|
|
}
|
|
/**
|
|
* RIPEMD-160 - a legacy hash function from 1990s.
|
|
* * https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
|
|
* * https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf
|
|
*/
|
|
export declare const ripemd160: CHash;
|
|
//# sourceMappingURL=legacy.d.ts.map
|