diff --git a/LCX_ABT.sol b/LCX_ABT.sol
index 21d8b96..601d104 100644
--- a/LCX_ABT.sol
+++ b/LCX_ABT.sol
@@ -2,20 +2,8 @@ pragma solidity ^0.4.19;
/*
Copyright 2018, Vicent Nos, Enrique Santos & Mireia Puig
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
+
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/LCX_CIF.sol b/LCX_CIF.sol
index f32ddeb..64df2a7 100644
--- a/LCX_CIF.sol
+++ b/LCX_CIF.sol
@@ -3,18 +3,7 @@ pragma solidity ^0.4.19;
/*
Copyright 2018, Vicent Nos, Enrique Santos & Mireia Puig
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/LCX_CYC.sol b/LCX_CYC.sol
index 60c018b..b01bbbd 100644
--- a/LCX_CYC.sol
+++ b/LCX_CYC.sol
@@ -3,19 +3,7 @@ pragma solidity 0.4.24;
/*
Copyright 2018, Vicent Nos, Enrique Santos & Mireia Puig
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/LCX_Certificates_X509.sol b/LCX_Certificates_X509.sol
index b401541..10fc05a 100644
--- a/LCX_Certificates_X509.sol
+++ b/LCX_Certificates_X509.sol
@@ -5,18 +5,7 @@ pragma solidity ^0.4.20;
/*
Copyright 2018, Vicent Nos & Enrique Santos
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/LCX_ISC.sol b/LCX_ISC.sol
index 89ec664..a54729f 100644
--- a/LCX_ISC.sol
+++ b/LCX_ISC.sol
@@ -3,18 +3,7 @@ pragma solidity ^0.4.24;
/*
Copyright 2018, Vicent Nos, Enrique Santos & Mireia Puig
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/SolRsaVerify.sol b/SolRsaVerify.sol
deleted file mode 100644
index 4ed1e80..0000000
--- a/SolRsaVerify.sol
+++ /dev/null
@@ -1,377 +0,0 @@
-pragma solidity ^0.4.15;
-
-/*
- Copyright 2016, AdriĆ Massanet
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
- Checked results with FIPS test vectors
- https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/dss/186-3rsatestvectors.zip
- file SigVer15_186-3.rsp
-
- */
-
-contract SolRsaVerify {
-
- function memcpy(uint dest, uint src, uint len) private {
- // Copy word-length chunks while possible
- for(; len >= 32; len -= 32) {
- assembly {
- mstore(dest, mload(src))
- }
- dest += 32;
- src += 32;
- }
-
- // Copy remaining bytes
- uint mask = 256 ** (32 - len) - 1;
- assembly {
- let srcpart := and(mload(src), not(mask))
- let destpart := and(mload(dest), mask)
- mstore(dest, or(destpart, srcpart))
- }
- }
-
-
- uint8[] SHA256PREFIX = [
- 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20
- ];
-
- function join(bytes s, bytes e, bytes m) internal returns (bytes) {
- uint input_len = 0x60+s.length+e.length+m.length;
-
- uint s_len = s.length;
- uint e_len = e.length;
- uint m_len = m.length;
- uint s_ptr;
- uint e_ptr;
- uint m_ptr;
- uint input_ptr;
-
- bytes memory input = new bytes(input_len);
- assembly {
- s_ptr := add(s,0x20)
- e_ptr := add(e,0x20)
- m_ptr := add(m,0x20)
- mstore(add(input,0x20),s_len)
- mstore(add(input,0x40),e_len)
- mstore(add(input,0x60),m_len)
- input_ptr := add(input,0x20)
- }
- memcpy(input_ptr+0x60,s_ptr,s.length);
- memcpy(input_ptr+0x60+s.length,e_ptr,e.length);
- memcpy(input_ptr+0x60+s.length+e.length,m_ptr,m.length);
-
- return input;
- }
-
- function pkcs1Sha256Verify(bytes32 hash, bytes s, bytes e, bytes m) returns (uint){
- uint i;
-
- require(m.length >= SHA256PREFIX.length+hash.length+11);
-
- /// decipher
- bytes memory input = join(s,e,m);
- uint input_len = input.length;
-
- uint decipherlen = m.length;
- bytes memory decipher=new bytes(decipherlen);
- bool success;
- assembly {
- success := call(sub(gas, 2000), 5, 0, add(input,0x20), input_len, add(decipher,0x20), decipherlen)
- switch success case 0 { invalid }
- }
-
- /// 0x00 || 0x01 || PS || 0x00 || DigestInfo
- /// PS is padding filled with 0xff
- // DigestInfo ::= SEQUENCE {
- // digestAlgorithm AlgorithmIdentifier,
- // digest OCTET STRING
- // }
-
- uint paddingLen = decipherlen - 3 - SHA256PREFIX.length - 32;
-
- if (decipher[0] != 0 || decipher[1] != 1) {
- return 1;
- }
- for (i=2;i<2+paddingLen;i++) {
- if (decipher[i] != 0xff) {
- return 2;
- }
- }
- if (decipher[2+paddingLen] != 0) {
- return 3;
- }
- for (i=0;i.
-
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/tests/contracts/LCX_CIF.sol b/tests/contracts/LCX_CIF.sol
index 4379451..d799e28 100644
--- a/tests/contracts/LCX_CIF.sol
+++ b/tests/contracts/LCX_CIF.sol
@@ -3,19 +3,7 @@ pragma solidity ^0.4.19;
/*
Copyright 2018, Vicent Nos, Enrique Santos & Mireia Puig
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/tests/contracts/LCX_CYC.sol b/tests/contracts/LCX_CYC.sol
index fb078e1..4986f76 100644
--- a/tests/contracts/LCX_CYC.sol
+++ b/tests/contracts/LCX_CYC.sol
@@ -3,19 +3,7 @@ pragma solidity 0.4.24;
/*
Copyright 2018, Vicent Nos, Enrique Santos & Mireia Puig
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/tests/contracts/LCX_ISC.sol b/tests/contracts/LCX_ISC.sol
index 1627e96..08e7575 100644
--- a/tests/contracts/LCX_ISC.sol
+++ b/tests/contracts/LCX_ISC.sol
@@ -3,18 +3,7 @@ pragma solidity ^0.4.24;
/*
Copyright 2018, Vicent Nos, Enrique Santos & Mireia Puig
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/
diff --git a/tests/contracts/LCX_ISC2.sol b/tests/contracts/LCX_ISC2.sol
index 76ee922..36f4a1a 100644
--- a/tests/contracts/LCX_ISC2.sol
+++ b/tests/contracts/LCX_ISC2.sol
@@ -3,19 +3,7 @@ pragma solidity ^0.4.19;
/*
Copyright 2018, Vicent Nos, Enrique Santos & Mireia Puig
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
+ https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
*/