diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..4522a59 --- /dev/null +++ b/COPYING @@ -0,0 +1,19 @@ +Copyright (c) 2013 Pieter Wuille + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Makefile b/Makefile index f7d1ab3..e9a1609 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ obj/secp256k1.o: $(FILES) src/secp256k1.c include/secp256k1.h $(CC) -fPIC -std=c99 $(CFLAGS) $(CFLAGS_EXTRA) -DNDEBUG -O2 src/secp256k1.c -c -o obj/secp256k1.o bench: $(FILES) src/bench.c $(OBJS) - $(CC) -fPIC -std=c99 $(CFLAGS) $(CFLAGS_EXTRA) -DNDEBUG -O2 src/bench.c $(OBJS) $(LDFLAGS_EXTRA) -o bench + $(CC) -fPIC -std=c99 $(CFLAGS) $(CFLAGS_EXTRA) $(CFLAGS_TEST_EXTRA) -DNDEBUG -O2 src/bench.c $(OBJS) $(LDFLAGS_EXTRA) $(LDFLAGS_TEST_EXTRA) -o bench tests: $(FILES) src/tests.c $(OBJS) $(CC) -std=c99 $(CFLAGS) $(CFLAGS_EXTRA) $(CFLAGS_TEST_EXTRA) -DVERIFY -fstack-protector-all -O2 -ggdb3 src/tests.c $(OBJS) $(LDFLAGS_EXTRA) $(LDFLAGS_TEST_EXTRA) -o tests diff --git a/src/ecdsa.h b/src/ecdsa.h index 3b4eab6..d9faaa3 100644 --- a/src/ecdsa.h +++ b/src/ecdsa.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_ECDSA_ #define _SECP256K1_ECDSA_ diff --git a/src/ecmult.h b/src/ecmult.h index db62486..856bd28 100644 --- a/src/ecmult.h +++ b/src/ecmult.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_ECMULT_ #define _SECP256K1_ECMULT_ diff --git a/src/field.h b/src/field.h index 039d572..7d187d0 100644 --- a/src/field.h +++ b/src/field.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_ #define _SECP256K1_FIELD_ diff --git a/src/field_10x26.h b/src/field_10x26.h index 72c5829..d544139 100644 --- a/src/field_10x26.h +++ b/src/field_10x26.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_REPR_ #define _SECP256K1_FIELD_REPR_ diff --git a/src/field_5x52.h b/src/field_5x52.h index 8ccad03..9d5de2c 100644 --- a/src/field_5x52.h +++ b/src/field_5x52.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_REPR_ #define _SECP256K1_FIELD_REPR_ diff --git a/src/field_gmp.h b/src/field_gmp.h index 44a8c60..d51dea0 100644 --- a/src/field_gmp.h +++ b/src/field_gmp.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_REPR_ #define _SECP256K1_FIELD_REPR_ diff --git a/src/group.h b/src/group.h index 1196299..dd601fa 100644 --- a/src/group.h +++ b/src/group.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_GROUP_ #define _SECP256K1_GROUP_ diff --git a/src/impl/ecdsa.h b/src/impl/ecdsa.h index cef6676..c8d5168 100644 --- a/src/impl/ecdsa.h +++ b/src/impl/ecdsa.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_ECDSA_IMPL_H_ #define _SECP256K1_ECDSA_IMPL_H_ diff --git a/src/impl/ecmult.h b/src/impl/ecmult.h index 0828488..6acb4c4 100644 --- a/src/impl/ecmult.h +++ b/src/impl/ecmult.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_ECMULT_IMPL_H_ #define _SECP256K1_ECMULT_IMPL_H_ diff --git a/src/impl/field.h b/src/impl/field.h index 9f891c9..c43188a 100644 --- a/src/impl/field.h +++ b/src/impl/field.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_IMPL_H_ #define _SECP256K1_FIELD_IMPL_H_ diff --git a/src/impl/field_10x26.h b/src/impl/field_10x26.h index 81747bf..4497692 100644 --- a/src/impl/field_10x26.h +++ b/src/impl/field_10x26.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_REPR_IMPL_H_ #define _SECP256K1_FIELD_REPR_IMPL_H_ diff --git a/src/impl/field_5x52.h b/src/impl/field_5x52.h index ff1e498..5347189 100644 --- a/src/impl/field_5x52.h +++ b/src/impl/field_5x52.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_REPR_IMPL_H_ #define _SECP256K1_FIELD_REPR_IMPL_H_ diff --git a/src/impl/field_5x52_asm.h b/src/impl/field_5x52_asm.h index 32cd55d..93c6ab6 100644 --- a/src/impl/field_5x52_asm.h +++ b/src/impl/field_5x52_asm.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_INNER5X52_IMPL_H_ #define _SECP256K1_FIELD_INNER5X52_IMPL_H_ diff --git a/src/impl/field_5x52_int128.h b/src/impl/field_5x52_int128.h index 8f187de..23cb134 100644 --- a/src/impl/field_5x52_int128.h +++ b/src/impl/field_5x52_int128.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_INNER5X52_IMPL_H_ #define _SECP256K1_FIELD_INNER5X52_IMPL_H_ diff --git a/src/impl/field_gmp.h b/src/impl/field_gmp.h index 570b20c..6172ef4 100644 --- a/src/impl/field_gmp.h +++ b/src/impl/field_gmp.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_FIELD_REPR_IMPL_H_ #define _SECP256K1_FIELD_REPR_IMPL_H_ diff --git a/src/impl/group.h b/src/impl/group.h index a39ae4c..37c509a 100644 --- a/src/impl/group.h +++ b/src/impl/group.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_GROUP_IMPL_H_ #define _SECP256K1_GROUP_IMPL_H_ diff --git a/src/impl/num.h b/src/impl/num.h index f27f0d1..fc6d05c 100644 --- a/src/impl/num.h +++ b/src/impl/num.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_NUM_IMPL_H_ #define _SECP256K1_NUM_IMPL_H_ diff --git a/src/impl/num_gmp.h b/src/impl/num_gmp.h index fbdf29c..75ef9dc 100644 --- a/src/impl/num_gmp.h +++ b/src/impl/num_gmp.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_NUM_REPR_IMPL_H_ #define _SECP256K1_NUM_REPR_IMPL_H_ diff --git a/src/impl/num_openssl.h b/src/impl/num_openssl.h index 9153252..0a54689 100644 --- a/src/impl/num_openssl.h +++ b/src/impl/num_openssl.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_NUM_REPR_IMPL_H_ #define _SECP256K1_NUM_REPR_IMPL_H_ diff --git a/src/impl/util.h b/src/impl/util.h index ef20b83..a59a00c 100644 --- a/src/impl/util.h +++ b/src/impl/util.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_UTIL_IMPL_H_ #define _SECP256K1_UTIL_IMPL_H_ diff --git a/src/num.h b/src/num.h index fa90a7b..b2e7462 100644 --- a/src/num.h +++ b/src/num.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_NUM_ #define _SECP256K1_NUM_ diff --git a/src/num_gmp.h b/src/num_gmp.h index a4c0b6b..960df86 100644 --- a/src/num_gmp.h +++ b/src/num_gmp.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_NUM_REPR_ #define _SECP256K1_NUM_REPR_ diff --git a/src/num_openssl.h b/src/num_openssl.h index de3f1a4..7d03757 100644 --- a/src/num_openssl.h +++ b/src/num_openssl.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_NUM_REPR_ #define _SECP256K1_NUM_REPR_ diff --git a/src/secp256k1.c b/src/secp256k1.c index fa22723..1f9e1f6 100644 --- a/src/secp256k1.c +++ b/src/secp256k1.c @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "impl/num.h" #include "impl/field.h" #include "impl/group.h" diff --git a/src/tests.c b/src/tests.c index 8ce338b..88b3e5e 100644 --- a/src/tests.c +++ b/src/tests.c @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include #include "impl/num.h" diff --git a/src/util.h b/src/util.h index 3aced7a..357c7e0 100644 --- a/src/util.h +++ b/src/util.h @@ -1,3 +1,7 @@ +// Copyright (c) 2013 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef _SECP256K1_UTIL_H_ #define _SECP256K1_UTIL_H_