11c11
< var sodium		= require('libsodium-wrappers-sumo');
---
> var rsaSign		= require('rsasign');
284,285c284
< 	falcon.bytes,
< 	sodium.ready
---
> 	falcon.bytes
293,295c292,294
< 	publicKeyBytes	= sodium.crypto_sign_PUBLICKEYBYTES + falconBytes.publicKeyBytes;
< 	privateKeyBytes	= sodium.crypto_sign_SECRETKEYBYTES + falconBytes.privateKeyBytes;
< 	bytes			= sodium.crypto_sign_BYTES + falconBytes.bytes;
---
> 	publicKeyBytes	= rsaSign.publicKeyBytes + falconBytes.publicKeyBytes;
> 	privateKeyBytes	= rsaSign.privateKeyBytes + falconBytes.privateKeyBytes;
> 	bytes			= rsaSign.bytes + falconBytes.bytes;
312c311
< 			sodium.crypto_sign_keypair(),
---
> 			rsaSign.keyPair(),
315c314
< 			var eccKeyPair		= results[0];
---
> 			var rsaKeyPair		= results[0];
324,327c323,326
< 			keyPair.publicKey.set(eccKeyPair.publicKey);
< 			keyPair.privateKey.set(eccKeyPair.privateKey);
< 			keyPair.publicKey.set(falconKeyPair.publicKey, sodium.crypto_sign_PUBLICKEYBYTES);
< 			keyPair.privateKey.set(falconKeyPair.privateKey, sodium.crypto_sign_SECRETKEYBYTES);
---
> 			keyPair.publicKey.set(rsaKeyPair.publicKey);
> 			keyPair.privateKey.set(rsaKeyPair.privateKey);
> 			keyPair.publicKey.set(falconKeyPair.publicKey, rsaSign.publicKeyBytes);
> 			keyPair.privateKey.set(falconKeyPair.privateKey, rsaSign.privateKeyBytes);
330c329
< 			sodiumUtil.memzero(eccKeyPair.privateKey);
---
> 			sodiumUtil.memzero(rsaKeyPair.privateKey);
332c331
< 			sodiumUtil.memzero(eccKeyPair.publicKey);
---
> 			sodiumUtil.memzero(rsaKeyPair.publicKey);
388c387
< 				sodium.crypto_sign_detached(
---
> 				rsaSign.signDetached(
393c392
< 						sodium.crypto_sign_SECRETKEYBYTES
---
> 						rsaSign.privateKeyBytes
400c399
< 						privateKey.byteOffset + sodium.crypto_sign_SECRETKEYBYTES,
---
> 						privateKey.byteOffset + rsaSign.privateKeyBytes,
407c406
< 			var eccSignature	= results[1];
---
> 			var rsaSignature	= results[1];
412,413c411,412
< 			signature.set(eccSignature);
< 			signature.set(falconSignature, sodium.crypto_sign_BYTES);
---
> 			signature.set(rsaSignature);
> 			signature.set(falconSignature, rsaSign.bytes);
417c416
< 			sodiumUtil.memzero(eccSignature);
---
> 			sodiumUtil.memzero(rsaSignature);
567,568c566,567
< 					return sodium.crypto_sign_verify_detached(
< 						new Uint8Array(signature.buffer, signature.byteOffset, sodium.crypto_sign_BYTES),
---
> 					return rsaSign.verifyDetached(
> 						new Uint8Array(signature.buffer, signature.byteOffset, rsaSign.bytes),
570c569
< 						new Uint8Array(pk.buffer, pk.byteOffset, sodium.crypto_sign_PUBLICKEYBYTES)
---
> 						new Uint8Array(pk.buffer, pk.byteOffset, rsaSign.publicKeyBytes)
577c576
< 							signature.byteOffset + sodium.crypto_sign_BYTES,
---
> 							signature.byteOffset + rsaSign.bytes,
583c582
< 							pk.byteOffset + sodium.crypto_sign_PUBLICKEYBYTES,
---
> 							pk.byteOffset + rsaSign.publicKeyBytes,
591c590
< 			var eccIsValid		= results[1];
---
> 			var rsaIsValid		= results[1];
593c592
< 			var valid			= eccIsValid && falconIsValid;
---
> 			var valid			= rsaIsValid && falconIsValid;
621c620
< 			var eccPrivateKey			= new Uint8Array(
---
> 			var rsaPrivateKey			= new Uint8Array(
636c635
< 			eccPrivateKey.set(new Uint8Array(
---
> 			rsaPrivateKey.set(new Uint8Array(
639c638
< 				sodium.crypto_sign_PUBLICKEYBYTES
---
> 				rsaSign.publicKeyBytes
641c640
< 			eccPrivateKey.set(
---
> 			rsaPrivateKey.set(
645c644
< 					sodium.crypto_sign_SECRETKEYBYTES
---
> 					rsaSign.privateKeyBytes
647c646
< 				sodium.crypto_sign_PUBLICKEYBYTES
---
> 				rsaSign.publicKeyBytes
652c651
< 				keyPair.publicKey.byteOffset + sodium.crypto_sign_PUBLICKEYBYTES,
---
> 				keyPair.publicKey.byteOffset + rsaSign.publicKeyBytes,
658c657
< 					keyPair.privateKey.byteOffset + sodium.crypto_sign_SECRETKEYBYTES,
---
> 					keyPair.privateKey.byteOffset + rsaSign.privateKeyBytes,
669c668
< 					encrypt(eccPrivateKey, password),
---
> 					encrypt(rsaPrivateKey, password),
675c674
< 					sodiumUtil.memzero(eccPrivateKey);
---
> 					sodiumUtil.memzero(rsaPrivateKey);
682c681
< 					eccPrivateKey,
---
> 					rsaPrivateKey,
696c695
< 			var eccPrivateKey			= results[0];
---
> 			var rsaPrivateKey			= results[0];
701c700
< 				classical: sodiumUtil.to_base64(eccPrivateKey),
---
> 				classical: sodiumUtil.to_base64(rsaPrivateKey),
708c707
< 			sodiumUtil.memzero(eccPrivateKey);
---
> 			sodiumUtil.memzero(rsaPrivateKey);
718c717
< 						sodium.crypto_sign_PUBLICKEYBYTES
---
> 						rsaSign.publicKeyBytes
723c722
< 						keyPair.publicKey.byteOffset + sodium.crypto_sign_PUBLICKEYBYTES,
---
> 						keyPair.publicKey.byteOffset + rsaSign.publicKeyBytes,
748c747
< 				var eccPrivateKey		= sodiumUtil.from_base64(keyData.private.classical);
---
> 				var rsaPrivateKey		= sodiumUtil.from_base64(keyData.private.classical);
752c751
< 					return [eccPrivateKey, falconPrivateKey];
---
> 					return [rsaPrivateKey, falconPrivateKey];
757c756
< 						eccPrivateKey,
---
> 						rsaPrivateKey,
796c795
< 				var eccPrivateKey		= results[0];
---
> 				var rsaPrivateKey		= results[0];
801,803c800,802
< 						eccPrivateKey.buffer,
< 						eccPrivateKey.byteOffset,
< 						sodium.crypto_sign_PUBLICKEYBYTES
---
> 						rsaPrivateKey.buffer,
> 						rsaPrivateKey.byteOffset,
> 						rsaSign.publicKeyBytes
812c811
< 					sodium.crypto_sign_PUBLICKEYBYTES
---
> 					rsaSign.publicKeyBytes
817,819c816,818
< 						eccPrivateKey.buffer,
< 						eccPrivateKey.byteOffset + sodium.crypto_sign_PUBLICKEYBYTES,
< 						sodium.crypto_sign_SECRETKEYBYTES
---
> 						rsaPrivateKey.buffer,
> 						rsaPrivateKey.byteOffset + rsaSign.publicKeyBytes,
> 						rsaSign.privateKeyBytes
828c827
< 					sodium.crypto_sign_SECRETKEYBYTES
---
> 					rsaSign.privateKeyBytes
842c841
< 						sodium.crypto_sign_PUBLICKEYBYTES
---
> 						rsaSign.publicKeyBytes
