Remove NaCL!

This commit is contained in:
Matt Corallo 2015-01-14 11:21:54 -10:00
parent 2eac191a6a
commit e7f3e52b6c
216 changed files with 11 additions and 1804 deletions

View File

@ -66,7 +66,6 @@ module.exports = function(grunt) {
libtextsecure: {
src: [
'libtextsecure/curve25519_concat.js',
'libtextsecure/nativeclient.js',
'libtextsecure/webcrypto_concat.js',
'libtextsecure/protobufs.js',

View File

@ -26,8 +26,6 @@
<script type="text/javascript" src="js/chromium.js"></script>
<script type="text/javascript" src="js/background.js"></script>
</head>
<body data-name="curve25519" data-tools="pnacl" data-configs="Debug Release" data-path="nacl/pnacl/{config}">
<div id="listener"></div>
<div id="log"></div>
<body>
</body>
</html>

View File

@ -97,15 +97,13 @@
"indexeddb-backbonejs-adapter",
"qrcode",
"libphonenumber-api",
"momentjs",
"native-client"
"momentjs"
],
"lib": [
"jquery",
"long",
"bytebuffer",
"protobuf",
"native-client"
"protobuf"
]
}
}

View File

@ -1,448 +0,0 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Set to true when the Document is loaded IFF "test=true" is in the query
// string.
var isTest = false;
// Set to true when loading a "Release" NaCl module, false when loading a
// "Debug" NaCl module.
var isRelease = false;
// Javascript module pattern:
// see http://en.wikipedia.org/wiki/Unobtrusive_JavaScript#Namespaces
// In essence, we define an anonymous function which is immediately called and
// returns a new object. The new object contains only the exported definitions;
// all other definitions in the anonymous function are inaccessible to external
// code.
var common = (function() {
function isHostToolchain(tool) {
return tool == 'win' || tool == 'linux' || tool == 'mac';
}
/**
* Return the mime type for NaCl plugin.
*
* @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc.
* @return {string} The mime-type for the kind of NaCl plugin matching
* the given toolchain.
*/
function mimeTypeForTool(tool) {
// For NaCl modules use application/x-nacl.
var mimetype = 'application/x-nacl';
if (isHostToolchain(tool)) {
// For non-NaCl PPAPI plugins use the x-ppapi-debug/release
// mime type.
if (isRelease)
mimetype = 'application/x-ppapi-release';
else
mimetype = 'application/x-ppapi-debug';
} else if (tool == 'pnacl' && isRelease) {
mimetype = 'application/x-pnacl';
}
return mimetype;
}
/**
* Check if the browser supports NaCl plugins.
*
* @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc.
* @return {bool} True if the browser supports the type of NaCl plugin
* produced by the given toolchain.
*/
function browserSupportsNaCl(tool) {
// Assume host toolchains always work with the given browser.
// The below mime-type checking might not work with
// --register-pepper-plugins.
if (isHostToolchain(tool)) {
return true;
}
var mimetype = mimeTypeForTool(tool);
return navigator.mimeTypes[mimetype] !== undefined;
}
/**
* Inject a script into the DOM, and call a callback when it is loaded.
*
* @param {string} url The url of the script to load.
* @param {Function} onload The callback to call when the script is loaded.
* @param {Function} onerror The callback to call if the script fails to load.
*/
function injectScript(url, onload, onerror) {
var scriptEl = document.createElement('script');
scriptEl.type = 'text/javascript';
scriptEl.src = url;
scriptEl.onload = onload;
if (onerror) {
scriptEl.addEventListener('error', onerror, false);
}
document.head.appendChild(scriptEl);
}
/**
* Run all tests for this example.
*
* @param {Object} moduleEl The module DOM element.
*/
function runTests(moduleEl) {
console.log('runTests()');
common.tester = new Tester();
// All NaCl SDK examples are OK if the example exits cleanly; (i.e. the
// NaCl module returns 0 or calls exit(0)).
//
// Without this exception, the browser_tester thinks that the module
// has crashed.
common.tester.exitCleanlyIsOK();
common.tester.addAsyncTest('loaded', function(test) {
test.pass();
});
if (typeof window.addTests !== 'undefined') {
window.addTests();
}
common.tester.waitFor(moduleEl);
common.tester.run();
}
/**
* Create the Native Client <embed> element as a child of the DOM element
* named "listener".
*
* @param {string} name The name of the example.
* @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc.
* @param {string} path Directory name where .nmf file can be found.
* @param {number} width The width to create the plugin.
* @param {number} height The height to create the plugin.
* @param {Object} attrs Dictionary of attributes to set on the module.
*/
function createNaClModule(name, tool, path, width, height, attrs) {
var moduleEl = document.createElement('embed');
moduleEl.setAttribute('name', 'nacl_module');
moduleEl.setAttribute('id', 'nacl_module');
moduleEl.setAttribute('width', width);
moduleEl.setAttribute('height', height);
moduleEl.setAttribute('path', path);
moduleEl.setAttribute('src', path + '/' + name + '.nmf');
// Add any optional arguments
if (attrs) {
for (var key in attrs) {
moduleEl.setAttribute(key, attrs[key]);
}
}
var mimetype = mimeTypeForTool(tool);
moduleEl.setAttribute('type', mimetype);
// The <EMBED> element is wrapped inside a <DIV>, which has both a 'load'
// and a 'message' event listener attached. This wrapping method is used
// instead of attaching the event listeners directly to the <EMBED> element
// to ensure that the listeners are active before the NaCl module 'load'
// event fires.
var listenerDiv = document.getElementById('listener');
listenerDiv.appendChild(moduleEl);
// Host plugins don't send a moduleDidLoad message. We'll fake it here.
var isHost = isHostToolchain(tool);
if (isHost) {
window.setTimeout(function() {
moduleEl.readyState = 1;
moduleEl.dispatchEvent(new CustomEvent('loadstart'));
moduleEl.readyState = 4;
moduleEl.dispatchEvent(new CustomEvent('load'));
moduleEl.dispatchEvent(new CustomEvent('loadend'));
}, 100); // 100 ms
}
// This is code that is only used to test the SDK.
if (isTest) {
var loadNaClTest = function() {
injectScript('nacltest.js', function() {
runTests(moduleEl);
});
};
// Try to load test.js for the example. Whether or not it exists, load
// nacltest.js.
injectScript('test.js', loadNaClTest, loadNaClTest);
}
}
/**
* Add the default "load" and "message" event listeners to the element with
* id "listener".
*
* The "load" event is sent when the module is successfully loaded. The
* "message" event is sent when the naclModule posts a message using
* PPB_Messaging.PostMessage() (in C) or pp::Instance().PostMessage() (in
* C++).
*/
function attachDefaultListeners() {
var listenerDiv = document.getElementById('listener');
listenerDiv.addEventListener('load', moduleDidLoad, true);
listenerDiv.addEventListener('message', handleMessage, true);
listenerDiv.addEventListener('crash', handleCrash, true);
if (typeof window.attachListeners !== 'undefined') {
window.attachListeners();
}
}
/**
* Called when the Browser can not communicate with the Module
*
* This event listener is registered in attachDefaultListeners above.
*/
function handleCrash(event) {
if (common.naclModule.exitStatus == -1) {
updateStatus('CRASHED');
} else {
updateStatus('EXITED [' + common.naclModule.exitStatus + ']');
}
if (typeof window.handleCrash !== 'undefined') {
window.handleCrash(common.naclModule.lastError);
}
}
/**
* Called when the NaCl module is loaded.
*
* This event listener is registered in attachDefaultListeners above.
*/
function moduleDidLoad() {
common.naclModule = document.getElementById('nacl_module');
updateStatus('RUNNING');
if (typeof window.moduleDidLoad !== 'undefined') {
window.moduleDidLoad();
}
}
/**
* Hide the NaCl module's embed element.
*
* We don't want to hide by default; if we do, it is harder to determine that
* a plugin failed to load. Instead, call this function inside the example's
* "moduleDidLoad" function.
*
*/
function hideModule() {
// Setting common.naclModule.style.display = "None" doesn't work; the
// module will no longer be able to receive postMessages.
common.naclModule.style.height = '0';
}
/**
* Remove the NaCl module from the page.
*/
function removeModule() {
common.naclModule.parentNode.removeChild(common.naclModule);
common.naclModule = null;
}
/**
* Return true when |s| starts with the string |prefix|.
*
* @param {string} s The string to search.
* @param {string} prefix The prefix to search for in |s|.
*/
function startsWith(s, prefix) {
// indexOf would search the entire string, lastIndexOf(p, 0) only checks at
// the first index. See: http://stackoverflow.com/a/4579228
return s.lastIndexOf(prefix, 0) === 0;
}
/** Maximum length of logMessageArray. */
var kMaxLogMessageLength = 20;
/** An array of messages to display in the element with id "log". */
var logMessageArray = [];
/**
* Add a message to an element with id "log".
*
* This function is used by the default "log:" message handler.
*
* @param {string} message The message to log.
*/
function logMessage(message) {
logMessageArray.push(message);
if (logMessageArray.length > kMaxLogMessageLength)
logMessageArray.shift();
document.getElementById('log').textContent = logMessageArray.join('\n');
console.log(message);
}
/**
*/
var defaultMessageTypes = {
'alert': alert,
'log': logMessage
};
/**
* Called when the NaCl module sends a message to JavaScript (via
* PPB_Messaging.PostMessage())
*
* This event listener is registered in createNaClModule above.
*
* @param {Event} message_event A message event. message_event.data contains
* the data sent from the NaCl module.
*/
function handleMessage(message_event) {
if (typeof message_event.data === 'string') {
for (var type in defaultMessageTypes) {
if (defaultMessageTypes.hasOwnProperty(type)) {
if (startsWith(message_event.data, type + ':')) {
func = defaultMessageTypes[type];
func(message_event.data.slice(type.length + 1));
return;
}
}
}
}
if (typeof window.handleMessage !== 'undefined') {
window.handleMessage(message_event);
return;
}
logMessage('Unhandled message: ' + message_event.data);
}
/**
* Called when the DOM content has loaded; i.e. the page's document is fully
* parsed. At this point, we can safely query any elements in the document via
* document.querySelector, document.getElementById, etc.
*
* @param {string} name The name of the example.
* @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc.
* @param {string} path Directory name where .nmf file can be found.
* @param {number} width The width to create the plugin.
* @param {number} height The height to create the plugin.
* @param {Object} attrs Optional dictionary of additional attributes.
*/
function domContentLoaded(name, tool, path, width, height, attrs) {
// If the page loads before the Native Client module loads, then set the
// status message indicating that the module is still loading. Otherwise,
// do not change the status message.
updateStatus('Page loaded.');
if (!browserSupportsNaCl(tool)) {
updateStatus(
'Browser does not support NaCl (' + tool + '), or NaCl is disabled');
} else if (common.naclModule == null) {
updateStatus('Creating embed: ' + tool);
// We use a non-zero sized embed to give Chrome space to place the bad
// plug-in graphic, if there is a problem.
width = typeof width !== 'undefined' ? width : 200;
height = typeof height !== 'undefined' ? height : 200;
attachDefaultListeners();
createNaClModule(name, tool, path, width, height, attrs);
} else {
// It's possible that the Native Client module onload event fired
// before the page's onload event. In this case, the status message
// will reflect 'SUCCESS', but won't be displayed. This call will
// display the current message.
updateStatus('Waiting.');
}
}
/** Saved text to display in the element with id 'statusField'. */
var statusText = 'NO-STATUSES';
/**
* Set the global status message. If the element with id 'statusField'
* exists, then set its HTML to the status message as well.
*
* @param {string} opt_message The message to set. If null or undefined, then
* set element 'statusField' to the message from the last call to
* updateStatus.
*/
function updateStatus(opt_message) {
if (opt_message) {
statusText = opt_message;
}
var statusField = document.getElementById('statusField');
if (statusField) {
statusField.innerHTML = statusText;
}
}
// The symbols to export.
return {
/** A reference to the NaCl module, once it is loaded. */
naclModule: null,
attachDefaultListeners: attachDefaultListeners,
domContentLoaded: domContentLoaded,
createNaClModule: createNaClModule,
hideModule: hideModule,
removeModule: removeModule,
logMessage: logMessage,
updateStatus: updateStatus
};
}());
// Listen for the DOM content to be loaded. This event is fired when parsing of
// the page's document has finished.
document.addEventListener('DOMContentLoaded', function() {
var body = document.body;
// The data-* attributes on the body can be referenced via body.dataset.
if (body.dataset) {
var loadFunction;
if (!body.dataset.customLoad) {
loadFunction = common.domContentLoaded;
} else if (typeof window.domContentLoaded !== 'undefined') {
loadFunction = window.domContentLoaded;
}
// From https://developer.mozilla.org/en-US/docs/DOM/window.location
var searchVars = {};
if (window.location.search.length > 1) {
var pairs = window.location.search.substr(1).split('&');
for (var key_ix = 0; key_ix < pairs.length; key_ix++) {
var keyValue = pairs[key_ix].split('=');
searchVars[unescape(keyValue[0])] =
keyValue.length > 1 ? unescape(keyValue[1]) : '';
}
}
if (loadFunction) {
var toolchains = body.dataset.tools.split(' ');
var configs = body.dataset.configs.split(' ');
var attrs = {};
if (body.dataset.attrs) {
var attr_list = body.dataset.attrs.split(' ');
for (var key in attr_list) {
var attr = attr_list[key].split('=');
var key = attr[0];
var value = attr[1];
attrs[key] = value;
}
}
var tc = toolchains.indexOf(searchVars.tc) !== -1 ?
searchVars.tc : toolchains[0];
var config = configs.indexOf(searchVars.config) !== -1 ?
searchVars.config : configs[0];
var pathFormat = body.dataset.path;
var path = pathFormat.replace('{tc}', tc).replace('{config}', config);
isTest = searchVars.test === 'true';
isRelease = path.toLowerCase().indexOf('release') != -1;
loadFunction(body.dataset.name, tc, path, body.dataset.width,
body.dataset.height, attrs);
}
}
});

View File

@ -15,7 +15,7 @@
<link href="/components/bootstrap-tagsinput/dist/bootstrap-tagsinput.css" rel="stylesheet" type="text/css" />
<link href="/stylesheets/index.css" rel="stylesheet" type="text/css" />
</head>
<body class='signal index' data-name="curve25519" data-tools="pnacl" data-configs="Debug Release" data-path="nacl/pnacl/{config}">
<body class='signal index'>
<div class='title-bar' id='header'>
<a href id='new-message'>New message</a>
<a href id='new-group'>New group</a>
@ -156,7 +156,5 @@
<script type="text/javascript" src="js/views/new_group_view.js"></script>
<script type="text/javascript" src="js/views/inbox_view.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<div id="listener"></div>
<div id="log"></div>
</body>
</html>

View File

@ -22,11 +22,6 @@
* for all low-level crypto operations,
*/
function curve25519() {
// use native client opportunistically, since it's faster
return textsecure.nativeclient || window.curve25519;
}
window.textsecure.crypto = {
getRandomBytes: function(size) {
// At some point we might consider XORing in hashes of random
@ -83,7 +78,7 @@
throw new Error("Invalid private key");
}
return curve25519().keyPair(privKey).then(function(raw_keys) {
return window.curve25519.keyPair(privKey).then(function(raw_keys) {
// prepend version byte
var origPub = new Uint8Array(raw_keys.pubKey);
var pub = new Uint8Array(33);
@ -101,7 +96,7 @@
if (pubKey === undefined || pubKey.byteLength != 32)
throw new Error("Invalid public key");
return curve25519().sharedSecret(pubKey, privKey);
return window.curve25519.sharedSecret(pubKey, privKey);
},
Ed25519Sign: function(privKey, message) {
if (privKey === undefined || privKey.byteLength != 32)
@ -110,7 +105,7 @@
if (message === undefined)
throw new Error("Invalid message");
return curve25519().sign(privKey, message);
return window.curve25519.sign(privKey, message);
},
Ed25519Verify: function(pubKey, msg, sig) {
pubKey = validatePubKeyFormat(pubKey);
@ -124,7 +119,7 @@
if (sig === undefined || sig.byteLength != 64)
throw new Error("Invalid signature");
return curve25519().verify(pubKey, msg, sig);
return window.curve25519.verify(pubKey, msg, sig);
}
};

View File

@ -1,94 +0,0 @@
/* vim: ts=4:sw=4:expandtab
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
;(function() {
'use strict';
window.textsecure = window.textsecure || {};
if ((navigator.mimeTypes['application/x-nacl'] === undefined &&
navigator.mimeTypes['application/x-pnacl'] === undefined) ||
window.location.protocol != "chrome-extension:") {
// browser does not support native client.
return;
}
var naclMessageNextId = 0;
var naclMessageIdCallbackMap = {};
window.handleMessage = function(message) {
naclMessageIdCallbackMap[message.data.call_id](message.data);
}
function postMessage(message) {
return new Promise(function(resolve) {
return registerOnLoadFunction(function() {
naclMessageIdCallbackMap[naclMessageNextId] = resolve;
message.call_id = naclMessageNextId++;
common.naclModule.postMessage(message);
});
});
};
var onLoadCallbacks = [];
var naclLoaded = false;
window.moduleDidLoad = function() {
common.hideModule();
naclLoaded = true;
for (var i = 0; i < onLoadCallbacks.length; i++) {
try {
onLoadCallbacks[i][1](onLoadCallbacks[i][0]());
} catch (e) {
onLoadCallbacks[i][2](e);
}
}
onLoadCallbacks = [];
};
function registerOnLoadFunction(func) {
return new Promise(function(resolve, reject) {
if (naclLoaded) {
return resolve(func());
} else {
onLoadCallbacks[onLoadCallbacks.length] = [ func, resolve, reject ];
}
});
};
window.textsecure.nativeclient = {
keyPair: function(priv) {
return postMessage({command: "bytesToPriv", priv: priv}).then(function(message) {
var priv = message.res.slice(0, 32);
return postMessage({command: "privToPub", priv: priv}).then(function(message) {
return { pubKey: message.res.slice(0, 32), privKey: priv };
});
});
},
sharedSecret: function(pub, priv) {
return postMessage({command: "ECDHE", pub: pub, priv: priv}).then(function(message) {
return message.res.slice(0, 32);
});
},
sign: function(priv, msg) {
return postMessage({command: "Ed25519Sign", priv: priv, msg: msg}).then(function(message) {
return message.res;
});
},
verify: function(pub, msg, sig) {
return postMessage({command: "Ed25519Verify", pub: pub, msg: msg, sig: sig}).then(function(message) {
if (!message.res)
throw new Error("Invalid signature");
});
}
};
})();

View File

@ -18,10 +18,6 @@
window.assert = chai.assert;
describe("Crypto", function() {
if (window.textsecure.nativeclient) {
it("supports Native Client", function() {});
}
describe("Encrypt AES-CBC", function() {
it('works', function(done) {
var key = hexToArrayBuffer('603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4');

View File

@ -1,21 +0,0 @@
/* vim: ts=4:sw=4
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
'use strict';
describe('curve25519_compiled.js', function() {
test_curve25519_implementation(curve25519);
});

View File

@ -1,111 +0,0 @@
/* vim: ts=4:sw=4
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
'use strict';
/*
* We don't run any tests here, just define an abstract test function
* that excercises our requirements for curve25519 interface, which are
*
* keyPair(privateKey)
* takes a 32-byte private key array buffer and outputs the corresponding
* public key as an array buffer
*
* sharedSecret(publicKey, privateKey)
* computes a shared secret from two curve25519 keys using the given keys
*
* sign(privateKey, message)
* computes a signature for the given message using a private key
*
* verify(publicKey, message, signature)
* verifies a signature for the given message using a public key
*
*/
var test_curve25519_implementation = function(implementation) {
describe("Curve25519", function() {
var alice_bytes = hexToArrayBuffer("77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a");
var alice_priv = hexToArrayBuffer("70076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c6a");
var alice_pub = hexToArrayBuffer("8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a");
var bob_bytes = hexToArrayBuffer("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb");
var bob_priv = hexToArrayBuffer("58ab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e06b");
var bob_pub = hexToArrayBuffer("de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f");
var shared_sec = hexToArrayBuffer("4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742");
describe("keyPair", function() {
it ('converts alice private keys to a keypair', function(done) {
implementation.keyPair(alice_bytes).then(function(keypair) {
assertEqualArrayBuffers(keypair.privKey, alice_priv);
assertEqualArrayBuffers(keypair.pubKey, alice_pub);
done();
}).catch(done);
});
it ('converts bob private keys to a keypair', function(done) {
implementation.keyPair(bob_bytes).then(function(keypair) {
assertEqualArrayBuffers(keypair.privKey, bob_priv);
assertEqualArrayBuffers(keypair.pubKey, bob_pub);
done();
}).catch(done);
});
});
describe("sharedSecret", function() {
it("computes the shared secret for alice", function(done) {
implementation.sharedSecret(bob_pub, alice_priv).then(function(secret) {
assertEqualArrayBuffers(shared_sec, secret);
done();
}).catch(done);
});
it("computes the shared secret for bob", function(done) {
implementation.sharedSecret(alice_pub, bob_priv).then(function(secret) {
assertEqualArrayBuffers(shared_sec, secret);
done();
}).catch(done);
});
});
var priv = hexToArrayBuffer("48a8892cc4e49124b7b57d94fa15becfce071830d6449004685e387c62409973");
var pub = hexToArrayBuffer("55f1bfede27b6a03e0dd389478ffb01462e5c52dbbac32cf870f00af1ed9af3a");
var msg = hexToArrayBuffer("617364666173646661736466");
var sig = hexToArrayBuffer("2bc06c745acb8bae10fbc607ee306084d0c28e2b3bb819133392473431291fd0dfa9c7f11479996cf520730d2901267387e08d85bbf2af941590e3035a545285");
describe("sign", function() {
it("computes the signature", function(done) {
implementation.sign(priv, msg).then(function(signature) {
assertEqualArrayBuffers(sig, signature);
done();
}).catch(done);
});
});
describe("verify", function() {
it("throws on bad signature", function(done) {
var badsig = sig.slice(0);
new Uint8Array(badsig).set([0], 0);
implementation.verify(pub, msg, badsig).catch(function(e) {
if (e.message === 'Invalid signature') {
done();
} else { throw e; }
}).catch(done);
});
it("does not throw on good signature", function(done) {
implementation.verify(pub, msg, sig).then(done).catch(done);
});
});
});
};

View File

@ -18,12 +18,9 @@
<title>libTextSecure test runner</title>
<link rel="stylesheet" href="../../components/mocha/mocha.css" />
</head>
<body data-name="curve25519" data-tools="pnacl" data-configs="Debug Release" data-path="../../nacl/pnacl/{config}">
<body>
<h2>Run this out of the chrome-plugin:// namespace (and expect plugin state to be cleared/corrupted), not file://</h2>
<div id="listener"></div>
<div id="log"></div>
<div id="mocha">
</div>
<div id="tests">
@ -35,7 +32,6 @@
<script type="text/javascript" src="../components.js"></script>
<script type="text/javascript" src="../curve25519_concat.js"></script>
<script type="text/javascript" src="../nativeclient.js"></script>
<script type="text/javascript" src="../webcrypto_concat.js"></script>
<script type="text/javascript" src="../protobufs.js" data-cover></script>
@ -54,10 +50,7 @@
<script type="text/javascript" src="fake_api.js"></script>
<script type="text/javascript" src="testvectors.js"></script>
<script type="text/javascript" src="curve25519_test.js"></script>
<script type="text/javascript" src="crypto_test.js"></script>
<script type="text/javascript" src="nativeclient_test.js"></script>
<script type="text/javascript" src="curve25519_compiled_test.js"></script>
<script type="text/javascript" src="helpers_test.js"></script>
<script type="text/javascript" src="websocket-resources_test.js"></script>
<script type="text/javascript" src="protocol_test.js"></script>

View File

@ -1,25 +0,0 @@
/* vim: ts=4:sw=4
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
'use strict';
describe("Native Client", function() {
if (textsecure.nativeclient) {
test_curve25519_implementation(textsecure.nativeclient);
} else {
it.skip('Not supported');
}
});

View File

@ -1,22 +0,0 @@
VALID_TOOLCHAINS := pnacl
include $(NACL_SDK_ROOT)/tools/common.mk
TARGET = curve25519
LIBS = ppapi_cpp ppapi
CFLAGS = -Wall -Werror -Ied25519/nacl_includes -Ied25519 -Ied25519/sha512
SOURCES = curve25519-donna.c curve25519-donna-wrapper.cpp $(wildcard ed25519/*.c) $(wildcard ed25519/additions/*.c) ed25519/sha512/sha2big.c
# Build rules generated by macros from common.mk:
$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
ifeq ($(CONFIG),Release)
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
endif
$(eval $(call NMF_RULE,$(TARGET),))

View File

@ -1,142 +0,0 @@
/*
* Copyright (c) 2013 Matt Corallo
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "curve25519-donna.h"
#include "ed25519/additions/curve_sigs.h"
#include <ppapi/cpp/instance.h>
#include <ppapi/cpp/module.h>
#include <ppapi/cpp/var.h>
#include <ppapi/cpp/var_dictionary.h>
#include <ppapi/cpp/var_array_buffer.h>
#include <string.h>
const unsigned char basepoint[32] = {9};
template<int Length>
class AutoArrayBufferObject {
private:
pp::VarArrayBuffer buf;
unsigned char* map;
public:
AutoArrayBufferObject(pp::Var v) : buf(v), map(NULL) {}
unsigned char *Get() {
if (map)
return map;
if (buf.is_null())
return NULL;
if (Length > 0 && buf.ByteLength() != Length)
return NULL;
map = static_cast<unsigned char*>(buf.Map());
return map;
}
long GetLength() {
return buf.is_null() ? -1 : buf.ByteLength();
}
~AutoArrayBufferObject() {
if (map)
buf.Unmap();
}
};
class Curve25519Instance : public pp::Instance {
public:
explicit Curve25519Instance(PP_Instance instance) : pp::Instance(instance) {}
virtual void HandleMessage(const pp::Var& var_message) {
if (!var_message.is_dictionary())
return; // Go away broken client
pp::VarDictionary dictionary(var_message);
std::string command = dictionary.Get("command").AsString();
pp::VarDictionary returnMessage;
pp::VarArrayBuffer resBuffer(64);
unsigned char* res = static_cast<unsigned char*>(resBuffer.Map());
if (command == "bytesToPriv") {
AutoArrayBufferObject<32> priv(dictionary.Get("priv"));
if (!priv.Get())
return; // Go away broken client
memcpy(res, priv.Get(), 32);
res[0] &= 248;
res[31] &= 127;
res[31] |= 64;
} else if (command == "privToPub") {
AutoArrayBufferObject<32> priv(dictionary.Get("priv"));
if (!priv.Get())
return; // Go away broken client
curve25519_donna(res, priv.Get(), basepoint);
} else if (command == "ECDHE") {
AutoArrayBufferObject<32> priv(dictionary.Get("priv"));
AutoArrayBufferObject<32> pub(dictionary.Get("pub"));
if (!priv.Get() || !pub.Get())
return; // Go away broken client
curve25519_donna(res, priv.Get(), pub.Get());
} else if (command == "Ed25519Sign") {
AutoArrayBufferObject<32> priv(dictionary.Get("priv"));
AutoArrayBufferObject<-1> msg(dictionary.Get("msg"));
if (!priv.Get() || !msg.Get())
return; // Go away broken client
curve25519_sign(res, priv.Get(), msg.Get(), msg.GetLength());
}
resBuffer.Unmap();
if (command != "Ed25519Verify")
returnMessage.Set("res", resBuffer);
else {
AutoArrayBufferObject<32> pub(dictionary.Get("pub"));
AutoArrayBufferObject<-1> msg(dictionary.Get("msg"));
AutoArrayBufferObject<64> sig(dictionary.Get("sig"));
if (!pub.Get() || !msg.Get() || !sig.Get())
return; // Go away broken client
bool res = curve25519_verify(sig.Get(), pub.Get(), msg.Get(), msg.GetLength()) == 0;
returnMessage.Set("res", res);
}
returnMessage.Set("call_id", dictionary.Get("call_id").AsInt());
PostMessage(returnMessage);
}
};
class Curve25519Module : public pp::Module {
public:
Curve25519Module() : pp::Module() {}
virtual pp::Instance* CreateInstance(PP_Instance instance) {
return new Curve25519Instance(instance);
}
};
namespace pp {
Module* CreateModule() {
return new Curve25519Module();
}
}

View File

@ -1,16 +0,0 @@
#ifndef CURVE25519_DONNA_H
#define CURVE25519_DONNA_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
int curve25519_donna(uint8_t *, const uint8_t *, const uint8_t *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,68 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/curve25519-donna-wrapper_pnacl.o: \
curve25519-donna-wrapper.cpp curve25519-donna.h \
ed25519/additions/curve_sigs.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/instance.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_instance.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_macros.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_stdint.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_resource.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/ppb_console.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_bool.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_var.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/instance_handle.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/view.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/resource.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/pass_ref.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/rect.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_rect.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_point.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_size.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/point.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/size.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/logging.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/module.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_module.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/ppb.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/ppb_core.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_completion_callback.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_time.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/core.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/var.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/var_dictionary.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/var_array.h \
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/var_array_buffer.h
:
curve25519-donna-wrapper.cpp:
curve25519-donna.h:
ed25519/additions/curve_sigs.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/instance.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_instance.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_macros.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_stdint.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_resource.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/ppb_console.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_bool.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_var.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/instance_handle.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/view.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/resource.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/pass_ref.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/rect.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_rect.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_point.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_size.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/point.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/size.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/logging.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/module.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_module.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/ppb.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/ppb_core.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_completion_callback.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/c/pp_time.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/core.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/var.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/var_dictionary.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/var_array.h:
/home/matt/nacl_sdk/pepper_31//include/ppapi/cpp/var_array_buffer.h:

View File

@ -1,3 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/curve25519-donna_pnacl.o: curve25519-donna.c
curve25519-donna.c:

Binary file not shown.

View File

@ -1,14 +0,0 @@
{
"files": {},
"program": {
"x86-64": {
"url": "curve25519_x86_64.nexe"
},
"arm": {
"url": "curve25519_arm.nexe"
},
"x86-32": {
"url": "curve25519_x86_32.nexe"
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
Directory Stamp

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/additions/compare_pnacl.o: \
ed25519/additions/compare.c ed25519/additions/compare.h
:
ed25519/additions/compare.c:
ed25519/additions/compare.h:

View File

@ -1,14 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/additions/curve_sigs_pnacl.o: \
ed25519/additions/curve_sigs.c ed25519/ge.h ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h ed25519/additions/curve_sigs.h \
ed25519/nacl_includes/crypto_sign.h \
ed25519/nacl_includes/crypto_sign_edwards25519sha512batch.h
:
ed25519/additions/curve_sigs.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/additions/curve_sigs.h:
ed25519/nacl_includes/crypto_sign.h:
ed25519/nacl_includes/crypto_sign_edwards25519sha512batch.h:

View File

@ -1 +0,0 @@
Directory Stamp

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/additions/sha512_pnacl.o: ed25519/additions/sha512.c \
ed25519/additions/sha512.h ed25519/sha512/sph_sha2.h \
ed25519/sha512/sph_types.h
ed25519/additions/sha512.c:
ed25519/additions/sha512.h:
ed25519/sha512/sph_sha2.h:
ed25519/sha512/sph_types.h:

View File

@ -1,15 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/additions/sign_modified_pnacl.o: \
ed25519/additions/sign_modified.c ed25519/nacl_includes/crypto_sign.h \
ed25519/nacl_includes/crypto_sign_edwards25519sha512batch.h \
ed25519/nacl_includes/crypto_hash_sha512.h ed25519/ge.h ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h ed25519/sc.h
:
ed25519/additions/sign_modified.c:
ed25519/nacl_includes/crypto_sign.h:
ed25519/nacl_includes/crypto_sign_edwards25519sha512batch.h:
ed25519/nacl_includes/crypto_hash_sha512.h:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/sc.h:

View File

@ -1 +0,0 @@
Directory Stamp

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_0_pnacl.o: ed25519/fe_0.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h
ed25519/fe_0.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_1_pnacl.o: ed25519/fe_1.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h
ed25519/fe_1.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_add_pnacl.o: ed25519/fe_add.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h
ed25519/fe_add.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_cmov_pnacl.o: ed25519/fe_cmov.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h
ed25519/fe_cmov.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_copy_pnacl.o: ed25519/fe_copy.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h
ed25519/fe_copy.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,10 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_frombytes_pnacl.o: ed25519/fe_frombytes.c \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h \
ed25519/nacl_includes/crypto_int64.h \
ed25519/nacl_includes/crypto_uint64.h
ed25519/fe_frombytes.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/nacl_includes/crypto_int64.h:
ed25519/nacl_includes/crypto_uint64.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_invert_pnacl.o: ed25519/fe_invert.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h ed25519/pow225521.h
ed25519/fe_invert.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/pow225521.h:

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_isnegative_pnacl.o: ed25519/fe_isnegative.c \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/fe_isnegative.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_isnonzero_pnacl.o: ed25519/fe_isnonzero.c \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h \
ed25519/nacl_includes/crypto_verify_32.h
ed25519/fe_isnonzero.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/nacl_includes/crypto_verify_32.h:

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_mul_pnacl.o: ed25519/fe_mul.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h \
ed25519/nacl_includes/crypto_int64.h
ed25519/fe_mul.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/nacl_includes/crypto_int64.h:

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_neg_pnacl.o: ed25519/fe_neg.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h
ed25519/fe_neg.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_pow22523_pnacl.o: ed25519/fe_pow22523.c \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h ed25519/pow22523.h
ed25519/fe_pow22523.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/pow22523.h:

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_sq2_pnacl.o: ed25519/fe_sq2.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h \
ed25519/nacl_includes/crypto_int64.h
ed25519/fe_sq2.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/nacl_includes/crypto_int64.h:

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_sq_pnacl.o: ed25519/fe_sq.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h \
ed25519/nacl_includes/crypto_int64.h
ed25519/fe_sq.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/nacl_includes/crypto_int64.h:

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_sub_pnacl.o: ed25519/fe_sub.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h
ed25519/fe_sub.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,6 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/fe_tobytes_pnacl.o: ed25519/fe_tobytes.c ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h
ed25519/fe_tobytes.c:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_add_pnacl.o: ed25519/ge_add.c ed25519/ge.h \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h ed25519/ge_add.h
ed25519/ge_add.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/ge_add.h:

View File

@ -1,10 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_double_scalarmult_pnacl.o: \
ed25519/ge_double_scalarmult.c ed25519/ge.h ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h ed25519/base2.h
:
ed25519/ge_double_scalarmult.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/base2.h:

View File

@ -1,10 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_frombytes_pnacl.o: ed25519/ge_frombytes.c \
ed25519/ge.h ed25519/fe.h ed25519/nacl_includes/crypto_int32.h \
ed25519/d.h ed25519/sqrtm1.h
ed25519/ge_frombytes.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/d.h:
ed25519/sqrtm1.h:

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_madd_pnacl.o: ed25519/ge_madd.c ed25519/ge.h \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h ed25519/ge_madd.h
ed25519/ge_madd.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/ge_madd.h:

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_msub_pnacl.o: ed25519/ge_msub.c ed25519/ge.h \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h ed25519/ge_msub.h
ed25519/ge_msub.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/ge_msub.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p1p1_to_p2_pnacl.o: ed25519/ge_p1p1_to_p2.c \
ed25519/ge.h ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/ge_p1p1_to_p2.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p1p1_to_p3_pnacl.o: ed25519/ge_p1p1_to_p3.c \
ed25519/ge.h ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/ge_p1p1_to_p3.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p2_0_pnacl.o: ed25519/ge_p2_0.c ed25519/ge.h \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/ge_p2_0.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,8 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p2_dbl_pnacl.o: ed25519/ge_p2_dbl.c ed25519/ge.h \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h ed25519/ge_p2_dbl.h
ed25519/ge_p2_dbl.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/ge_p2_dbl.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p3_0_pnacl.o: ed25519/ge_p3_0.c ed25519/ge.h \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/ge_p3_0.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p3_dbl_pnacl.o: ed25519/ge_p3_dbl.c ed25519/ge.h \
ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/ge_p3_dbl.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,9 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p3_to_cached_pnacl.o: ed25519/ge_p3_to_cached.c \
ed25519/ge.h ed25519/fe.h ed25519/nacl_includes/crypto_int32.h \
ed25519/d2.h
ed25519/ge_p3_to_cached.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/d2.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p3_to_p2_pnacl.o: ed25519/ge_p3_to_p2.c \
ed25519/ge.h ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/ge_p3_to_p2.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_p3_tobytes_pnacl.o: ed25519/ge_p3_tobytes.c \
ed25519/ge.h ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/ge_p3_tobytes.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,7 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_precomp_0_pnacl.o: ed25519/ge_precomp_0.c \
ed25519/ge.h ed25519/fe.h ed25519/nacl_includes/crypto_int32.h
ed25519/ge_precomp_0.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:

View File

@ -1,12 +0,0 @@
# Updated by fix_deps.py
pnacl/Debug/ed25519/ge_scalarmult_base_pnacl.o: \
ed25519/ge_scalarmult_base.c ed25519/ge.h ed25519/fe.h \
ed25519/nacl_includes/crypto_int32.h \
ed25519/nacl_includes/crypto_uint32.h ed25519/base.h
:
ed25519/ge_scalarmult_base.c:
ed25519/ge.h:
ed25519/fe.h:
ed25519/nacl_includes/crypto_int32.h:
ed25519/nacl_includes/crypto_uint32.h:
ed25519/base.h:

Some files were not shown because too many files have changed in this diff Show More