import bytesFromHex from '../helpers/bytes/bytesFromHex'; import bytesToHex from '../helpers/bytes/bytesToHex'; import CryptoWorker from '../lib/crypto/cryptoworker'; import type { RSAPublicKeyHex } from '../lib/mtproto/rsaKeysManager'; import '../lib/polyfill'; test('factorize', async() => { const data: {good?: [Uint8Array, Uint8Array], pq: Uint8Array}[] = [{ good: [new Uint8Array([86, 190, 62, 123]), new Uint8Array([88, 30, 39, 1])], pq: new Uint8Array([29, 219, 156, 252, 236, 172, 251, 123]) }, { good: [new Uint8Array([59, 165, 190, 67]), new Uint8Array([88, 86, 117, 215])], pq: new Uint8Array([20, 149, 30, 137, 202, 169, 105, 69]) }, { good: [new Uint8Array([75, 215, 20, 103]), new Uint8Array([77, 137, 174, 55])], pq: new Uint8Array([22, 248, 122, 217, 97, 50, 100, 33]) }, { // leemon cannot factorize that good: [new Uint8Array([59, 223, 139, 105]), new Uint8Array([62, 179, 202, 59])], pq: new Uint8Array([14, 170, 48, 94, 24, 240, 251, 51]) }, { good: [new Uint8Array([11]), new Uint8Array([1, 15, 141])], pq: new Uint8Array([11, 171, 15]) }, { good: [new Uint8Array([3]), new Uint8Array([5])], pq: new Uint8Array([15]) }]; const methods = [ 'factorize' as const, // 'factorize-tdlib' as const, // 'factorize-new-new' as const ]; for(const {good, pq} of data) { for(const method of methods) { const perf = performance.now(); await CryptoWorker.invokeCrypto(method, pq).then(pAndQ => { // console.log(method, performance.now() - perf, pAndQ); if(good) { expect(pAndQ).toEqual(good); } }); } // break; } }); test('sha1', () => { const bytes = new Uint8Array(bytesFromHex('ec5ac983081eeb1da706316227000000044af6cfb1000000046995dd57000000d55105998729349339eb322d86ec13bc0884f6ba0449d8ecbad0ef574837422579a11a88591796cdcc4c05690da0652462489286450179a635924bcc0ab83848')); CryptoWorker.invokeCrypto('sha1', bytes) .then(bytes => { //console.log(bytesFromArrayBuffer(buffer)); expect(bytes).toEqual(new Uint8Array([ 55, 160, 249, 190, 133, 135, 3, 45, 56, 157, 186, 81, 249, 0, 96, 235, 11, 10, 173, 197 ])); }); }); test('sha256', () => { CryptoWorker.invokeCrypto('sha256', new Uint8Array([112, 20, 211, 20, 106, 249, 203, 252, 39, 107, 106, 194, 63, 60, 13, 130, 51, 78, 107, 6, 110, 156, 214, 65, 205, 10, 30, 150, 79, 10, 145, 194, 232, 240, 127, 55, 146, 103, 248, 227, 160, 172, 30, 153, 122, 189, 110, 162, 33, 86, 174, 117])) .then(bytes => { expect(bytes).toEqual(new Uint8Array([158, 59, 39, 247, 130, 244, 235, 160, 16, 249, 34, 114, 67, 171, 203, 208, 187, 72, 217, 106, 253, 62, 195, 242, 52, 118, 99, 72, 221, 29, 203, 95])); }); const client_salt = new Uint8Array([58, 45, 208, 42, 210, 96, 229, 224, 220, 241, 61, 180, 91, 93, 132, 127, 29, 81, 244, 35, 114, 240, 134, 109, 60, 129, 157, 117, 214, 173, 161, 93, 61, 215, 199, 129, 184, 20, 247, 52]); // ! ! ! ! ! ! ! ! ! ! THIS IS WRONG WAY TO ENCODE AND CONCAT THEM AFTER ! ! ! ! ! ! ! ! ! ! ! ! ! /* let clientSaltString = ''; for(let i = 0; i < client_salt.length; i++) clientSaltString += String.fromCharCode(client_salt[i]); */ const payload = [ ['£', 'b4fe151e413445357b1c0935e7cf04a429492ebd23dc62bfadb2f898c431c1fd'], ['haha', '090b235e9eb8f197f2dd927937222c570396d971222d9009a9189e2b6cc0a2c1'], ['😂😘❤️😍😊😁👁👍🏿', 'f3cd34d2345934e10d95d01c7eae9040a6f3c4e20a02a392078b762d876ece8a'], ['$', '09fc96082d34c2dfc1295d92073b5ea1dc8ef8da95f14dfded011ffb96d3e54b'], //[clientSaltString + '😂😘❤️😍😊😁👁👍🏿' + clientSaltString, 'c2ac294f00e8ac4db6b94099f2014d763315cb2127b1e1ea178cfc3f302680d0'], [new Uint8Array(Array.from(client_salt).concat(Array.from(new TextEncoder().encode('😂😘❤️😍😊😁👁👍🏿')), Array.from(client_salt))), 'f11950fb40baf391b06a57e7490c8ad4d99ec0c1516c2bc7e529895296616ea7'] ]; payload.forEach(pair => { //const uint8 = new TextEncoder().encode(pair[0]); //CryptoWorker.sha256Hash(new Uint8Array(pair[0].split('').map(c => c.charCodeAt(0)))).then(bytes => { CryptoWorker.invokeCrypto('sha256', pair[0]).then(bytes => { const hex = bytesToHex(bytes); expect(hex).toEqual(pair[1]); }); }); }); test('rsa', () => { const publicKey: RSAPublicKeyHex = { // "fingerprint": "15032203592031600005", "modulus": "e8bb3305c0b52c6cf2afdf7637313489e63e05268e5badb601af417786472e5f93b85438968e20e6729a301c0afc121bf7151f834436f7fda680847a66bf64accec78ee21c0b316f0edafe2f41908da7bd1f4a5107638eeb67040ace472a14f90d9f7c2b7def99688ba3073adb5750bb02964902a359fe745d8170e36876d4fd8a5d41b2a76cbff9a13267eb9580b2d06d10357448d20d9da2191cb5d8c93982961cdfdeda629e37f1fb09a0722027696032fe61ed663db7a37f6f263d370f69db53a0dc0a1748bdaaff6209d5645485e6e001d1953255757e4b8e42813347b11da6ab500fd0ace7e6dfa3736199ccaf9397ed0745a427dcfa6cd67bcb1acff3", "exponent": "010001" }; const bytes = new Uint8Array([ 128, 44, 176, 17, 43, 185, 92, 222, 101, 45, 211, 184, 175, 154, 124, 57, 15, 214, 164, 165, 113, 127, 147, 133, 5, 140, 185, 174, 99, 182, 38, 56, 213, 169, 199, 173, 52, 240, 128, 225, 246, 190, 234, 221, 108, 175, 228, 25, 204, 154, 57, 235, 143, 95, 98, 15, 8, 100, 65, 117, 58, 91, 110, 200, 76, 207, 234, 44, 21, 138, 99, 134, 212, 188, 177, 72, 177, 203, 60, 145, 209, 63, 35, 230, 185, 73, 26, 103, 199, 71, 54, 53, 183, 182, 218, 163, 209, 26, 248, 231, 170, 70, 224, 204, 137, 177, 9, 228, 176, 212, 231, 137, 104, 205, 1, 68, 172, 59, 53, 246, 33, 95, 193, 158, 52, 203, 230, 57, 177, 7, 190, 97, 183, 79, 154, 242, 187, 170, 65, 30, 82, 102, 10, 1, 188, 191, 69, 156, 174, 208, 173, 141, 58, 190, 46, 243, 78, 200, 129, 210, 184, 100, 130, 83, 191, 107, 192, 143, 44, 232, 163, 150, 67, 62, 15, 91, 141, 115, 172, 183, 206, 133, 131, 239, 149, 133, 39, 15, 187, 200, 239, 75, 209, 102, 27, 185, 223, 186, 156, 34, 112, 120, 223, 37, 105, 130, 184, 232, 56, 173, 0, 165, 156, 83, 207, 134, 167, 32, 57, 60, 177, 219, 127, 102, 247, 76, 60, 248, 16, 0, 232, 215, 5, 235, 79, 237, 181, 229, 216, 97, 45, 52, 252, 109, 44, 94, 55, 113, 248, 125, 60, 216, 152, 79, 4, 7 ]); const good = new Uint8Array([ 166, 252, 51, 235, 146, 3, 147, 182, 43, 71, 71, 180, 236, 84, 235, 122, 40, 36, 254, 75, 52, 194, 162, 6, 166, 44, 227, 83, 148, 215, 72, 75, 80, 32, 100, 106, 172, 59, 220, 231, 233, 39, 122, 167, 255, 209, 132, 170, 109, 31, 151, 227, 70, 39, 196, 240, 25, 77, 255, 178, 17, 156, 153, 18, 19, 157, 208, 116, 49, 236, 150, 249, 245, 149, 226, 176, 101, 20, 201, 198, 177, 75, 166, 62, 151, 119, 64, 67, 253, 12, 199, 62, 210, 162, 59, 143, 170, 189, 66, 158, 51, 168, 56, 173, 231, 214, 100, 85, 54, 183, 1, 177, 162, 75, 245, 87, 205, 199, 245, 109, 60, 144, 78, 114, 38, 38, 71, 36, 34, 240, 40, 119, 154, 244, 35, 22, 5, 110, 174, 153, 62, 114, 182, 2, 180, 92, 137, 224, 218, 147, 197, 211, 168, 245, 147, 171, 80, 123, 178, 112, 76, 24, 104, 236, 117, 191, 60, 219, 25, 205, 128, 19, 59, 46, 67, 30, 240, 117, 194, 44, 247, 50, 55, 87, 139, 224, 23, 152, 129, 182, 101, 202, 24, 190, 67, 253, 63, 172, 210, 21, 151, 1, 30, 164, 52, 77, 75, 128, 86, 80, 177, 202, 69, 67, 65, 120, 217, 164, 251, 29, 86, 185, 43, 175, 22, 124, 10, 175, 181, 223, 130, 232, 47, 134, 67, 54, 226, 253, 25, 230, 197, 109, 205, 240, 242, 65, 233, 17, 98, 120, 106, 17, 142, 143, 9, 233 ]); CryptoWorker.invokeCrypto('rsa-encrypt', bytes, publicKey).then(encrypted => { expect(encrypted).toEqual(good); }); }); test('pbkdf2', () => { /* const crypto = require('crypto'); Object.defineProperty(global.self, 'crypto', { value: { getRandomValues: arr => crypto.randomBytes(arr.length), }, }); */ /* let buffer = new Uint8Array([ 166, 101, 158, 215, 174, 249, 101, 150, 109, 155, 243, 250, 221, 227, 251, 39, 34, 108, 230, 63, 198, 98, 9, 95, 20, 66, 186, 1, 245, 240, 185, 238 ]); let salt = new Uint8Array([ 40, 95, 205, 123, 107, 81, 255, 138, 0, 0, 0, 0, 0, 0, 0, 0 ]); let iterations = 100000; */ }); test('mod-pow', () => { const g_a = new Uint8Array([ 0xa8, 0x8b, 0xf9, 0xeb, 0xf9, 0x15, 0x19, 0x11, 0xdf, 0x3b, 0x1, 0x82, 0x52, 0x9c, 0x8f, 0xe1, 0xcd, 0x6, 0xf0, 0x46, 0xf7, 0x50, 0x34, 0x53, 0xe, 0xb9, 0x51, 0x21, 0x6d, 0xab, 0x1a, 0x36, 0x9d, 0x45, 0x3a, 0x7c, 0x62, 0x4a, 0x41, 0x4e, 0x0, 0x15, 0x42, 0x87, 0xfc, 0xef, 0x51, 0x2d, 0xfa, 0x6f, 0x5b, 0xde, 0xfb, 0x74, 0x62, 0xc3, 0x19, 0x20, 0x74, 0x91, 0x75, 0x84, 0xf2, 0xa8, 0x4b, 0xd8, 0x62, 0xb0, 0xb4, 0x19, 0xfe, 0x9, 0x65, 0x8, 0x94, 0xae, 0x27, 0xd2, 0x82, 0xd9, 0x96, 0xd9, 0xad, 0x1f, 0xbd, 0xef, 0xce, 0x77, 0x62, 0x6c, 0x7f, 0x79, 0xf5, 0x62, 0xbc, 0xd6, 0x4c, 0xf3, 0x6, 0x31, 0xf4, 0xf7, 0x3f, 0xc1, 0xde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, 0x41, 0xd, 0xba, 0x74, 0xd8, 0xa8, 0x4b, 0x2a, 0x14, 0xb3, 0x14, 0x4e, 0xe, 0xf1, 0x28, 0x47, 0x54, 0xfd, 0x17, 0xed, 0x95, 0xd, 0x59, 0x65, 0xb4, 0xb9, 0xdd, 0x46, 0x58, 0x2d, 0xb1, 0x17, 0x8d, 0x16, 0x9c, 0x6b, 0xc4, 0x65, 0xb0, 0xd6, 0xff, 0x9c, 0xa3, 0x92, 0x8f, 0xef, 0x5b, 0x9a, 0xe4, 0xe4, 0x18, 0xfc, 0x15, 0xe8, 0x3e, 0xbe, 0xa0, 0xf8, 0x7f, 0xa9, 0xff, 0x5e, 0xed, 0x70, 0x5, 0xd, 0xed, 0x28, 0x49, 0xf4, 0x7b, 0xf9, 0x59, 0xd9, 0x56, 0x85, 0xc, 0xe9, 0x29, 0x85, 0x1f, 0xd, 0x81, 0x15, 0xf6, 0x35, 0xb1, 0x5, 0xee, 0x2e, 0x4e, 0x15, 0xd0, 0x4b, 0x24, 0x54, 0xbf, 0x6f, 0x4f, 0xad, 0xf0, 0x34, 0xb1, 0x4, 0x3, 0x11, 0x9c, 0xd8, 0xe3, 0xb9, 0x2f, 0xcc, 0x5b ]); CryptoWorker.invokeCrypto('mod-pow', g_a, randomPower, p).then(encrypted => { const good = new Uint8Array([ 0x2c, 0xb2, 0x4, 0xe7, 0xa8, 0x63, 0x5f, 0x3e, 0xd0, 0x67, 0x5f, 0x76, 0x87, 0x37, 0x56, 0xc2, 0x2d, 0xe7, 0xd, 0xe3, 0x9b, 0xbd, 0x9d, 0xf6, 0x3b, 0x1f, 0xc, 0xb4, 0x37, 0xc6, 0xf, 0x75, 0x83, 0x1a, 0x8b, 0x65, 0x73, 0xf6, 0x83, 0x64, 0x16, 0x7e, 0xb3, 0xd8, 0xc1, 0xd, 0x1d, 0x69, 0xf4, 0x4, 0x25, 0x80, 0x6, 0x3b, 0xc7, 0x70, 0x55, 0xdb, 0x7d, 0x99, 0x39, 0x18, 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