From 5a3c730097ae8b2bd9febc9eefda595a093f5b03 Mon Sep 17 00:00:00 2001 From: fifteenthcommotion Date: Sat, 11 May 2019 16:31:46 -0700 Subject: [PATCH 1/4] contribute decently fast yggdrasil address generator in C --- contrib/yggdrasil-brute-simple/.gitignore | 7 ++ contrib/yggdrasil-brute-simple/LICENSE | 1 + contrib/yggdrasil-brute-simple/Makefile | 12 ++ contrib/yggdrasil-brute-simple/README.md | 8 ++ contrib/yggdrasil-brute-simple/util.c | 62 ++++++++++ .../yggdrasil-brute-multi-curve25519.c | 107 +++++++++++++++++ .../yggdrasil-brute-multi-ed25519.c | 109 ++++++++++++++++++ .../yggdrasil-brute-simple/yggdrasil-brute.h | 12 ++ 8 files changed, 318 insertions(+) create mode 100644 contrib/yggdrasil-brute-simple/.gitignore create mode 100644 contrib/yggdrasil-brute-simple/LICENSE create mode 100644 contrib/yggdrasil-brute-simple/Makefile create mode 100644 contrib/yggdrasil-brute-simple/README.md create mode 100644 contrib/yggdrasil-brute-simple/util.c create mode 100644 contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-curve25519.c create mode 100644 contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-ed25519.c create mode 100644 contrib/yggdrasil-brute-simple/yggdrasil-brute.h diff --git a/contrib/yggdrasil-brute-simple/.gitignore b/contrib/yggdrasil-brute-simple/.gitignore new file mode 100644 index 0000000..037dde6 --- /dev/null +++ b/contrib/yggdrasil-brute-simple/.gitignore @@ -0,0 +1,7 @@ +* +!.gitignore +!Makefile +!README.md +!LICENSE +!*.c +!*.h diff --git a/contrib/yggdrasil-brute-simple/LICENSE b/contrib/yggdrasil-brute-simple/LICENSE new file mode 100644 index 0000000..2549ece --- /dev/null +++ b/contrib/yggdrasil-brute-simple/LICENSE @@ -0,0 +1 @@ +As public domain as possible. Don't blame me if your computer explodes. diff --git a/contrib/yggdrasil-brute-simple/Makefile b/contrib/yggdrasil-brute-simple/Makefile new file mode 100644 index 0000000..aa2adc8 --- /dev/null +++ b/contrib/yggdrasil-brute-simple/Makefile @@ -0,0 +1,12 @@ +.PHONY: all + +all: util yggdrasil-brute-multi-curve25519 yggdrasil-brute-multi-ed25519 + +util: util.c + gcc -Wall -std=c89 -O3 -c -o util.o util.c + +yggdrasil-brute-multi-ed25519: yggdrasil-brute-multi-ed25519.c util.o + gcc -Wall -std=c89 -O3 -o yggdrasil-brute-multi-ed25519 -lsodium yggdrasil-brute-multi-ed25519.c util.o + +yggdrasil-brute-multi-curve25519: yggdrasil-brute-multi-curve25519.c util.o + gcc -Wall -std=c89 -O3 -o yggdrasil-brute-multi-curve25519 -lsodium yggdrasil-brute-multi-curve25519.c util.o diff --git a/contrib/yggdrasil-brute-simple/README.md b/contrib/yggdrasil-brute-simple/README.md new file mode 100644 index 0000000..f7b6876 --- /dev/null +++ b/contrib/yggdrasil-brute-simple/README.md @@ -0,0 +1,8 @@ +# yggdrasil-brute-simple + +Simple program for finding curve25519 and ed25519 public keys whose sha512 hash has many leading ones. +Because ed25519 private keys consist of a seed that is hashed to find the secret part of the keypair, +this program is near optimal for finding ed25519 keypairs. Curve25519 key generation, on the other hand, +could be further optimized with elliptic curve magic. + +Depends on libsodium. diff --git a/contrib/yggdrasil-brute-simple/util.c b/contrib/yggdrasil-brute-simple/util.c new file mode 100644 index 0000000..fd17e49 --- /dev/null +++ b/contrib/yggdrasil-brute-simple/util.c @@ -0,0 +1,62 @@ +#include "yggdrasil-brute.h" + +int find_where(unsigned char hash[64], unsigned char besthashlist[NUMKEYS][64]) { + /* Where to insert hash into sorted hashlist */ + int j; + int where = -1; + for (j = 0; j < NUMKEYS; ++j) { + if (memcmp(hash, besthashlist[j], 64) > 0) ++where; + else break; + } + return where; +} + +void insert_64(unsigned char itemlist[NUMKEYS][64], unsigned char item[64], int where) { + int j; + for (j = 0; j < where; ++j) { + memcpy(itemlist[j], itemlist[j+1], 64); + } + memcpy(itemlist[where], item, 64); +} + +void insert_32(unsigned char itemlist[NUMKEYS][32], unsigned char item[32], int where) { + int j; + for (j = 0; j < where; ++j) { + memcpy(itemlist[j], itemlist[j+1], 32); + } + memcpy(itemlist[where], item, 32); +} + +void make_addr(unsigned char addr[32], unsigned char hash[64]) { + /* Public key hash to yggdrasil ipv6 address */ + int i; + int offset; + unsigned char mask; + unsigned char c; + int ones = 0; + unsigned char br = 0; /* false */ + for (i = 0; i < 64 && !br; ++i) { + mask = 128; + c = hash[i]; + while (mask) { + if (c & mask) { + ++ones; + } else { + br = 1; /* true */ + break; + } + mask >>= 1; + } + } + + addr[0] = 2; + addr[1] = ones; + + offset = ones + 1; + for (i = 0; i < 14; ++i) { + c = hash[offset/8] << (offset%8); + c |= hash[offset/8 + 1] >> (8 - offset%8); + addr[i + 2] = c; + offset += 8; + } +} diff --git a/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-curve25519.c b/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-curve25519.c new file mode 100644 index 0000000..f0b6f55 --- /dev/null +++ b/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-curve25519.c @@ -0,0 +1,107 @@ +/* +sk: 32 random bytes +sk[0] &= 248; +sk[31] &= 127; +sk[31] |= 64; + +increment sk +pk = curve25519_scalarmult_base(mysecret) +hash = sha512(pk) + +if besthash: + bestsk = sk + besthash = hash +*/ + +#include "yggdrasil-brute.h" + + +void seed(unsigned char sk[32]) { + randombytes_buf(sk, 32); + sk[0] &= 248; + sk[31] &= 127; + sk[31] |= 64; +} + + +int main(int argc, char **argv) { + int i; + int j; + unsigned char addr[16]; + time_t starttime; + time_t requestedtime; + + unsigned char bestsklist[NUMKEYS][32]; + unsigned char bestpklist[NUMKEYS][32]; + unsigned char besthashlist[NUMKEYS][64]; + + unsigned char sk[32]; + unsigned char pk[32]; + unsigned char hash[64]; + + unsigned int runs = 0; + int where; + + + if (argc != 2) { + fprintf(stderr, "usage: ./yggdrasil-brute-multi-curve25519 \n"); + return 1; + } + + if (sodium_init() < 0) { + /* panic! the library couldn't be initialized, it is not safe to use */ + printf("sodium init failed!\n"); + return 1; + } + + starttime = time(NULL); + requestedtime = atoi(argv[1]); + + if (requestedtime < 0) requestedtime = 0; + fprintf(stderr, "Searching for yggdrasil curve25519 keys (this will take slightly longer than %ld seconds)\n", requestedtime); + + sodium_memzero(bestsklist, NUMKEYS * 32); + sodium_memzero(bestpklist, NUMKEYS * 32); + sodium_memzero(besthashlist, NUMKEYS * 64); + seed(sk); + + do { + /* generate pubkey, hash, compare, increment secret. + * this loop should take 4 seconds on modern hardware */ + for (i = 0; i < (1 << 16); ++i) { + ++runs; + if (crypto_scalarmult_curve25519_base(pk, sk) != 0) { + printf("scalarmult to create pub failed!\n"); + return 1; + } + crypto_hash_sha512(hash, pk, 32); + + where = find_where(hash, besthashlist); + if (where >= 0) { + insert_32(bestsklist, sk, where); + insert_32(bestpklist, pk, where); + insert_64(besthashlist, hash, where); + + seed(sk); + } + for (j = 1; j < 31; ++j) if (++sk[j]) break; + } + } while (time(NULL) - starttime < requestedtime || runs < NUMKEYS); + + fprintf(stderr, "--------------addr-------------- -----------------------------secret----------------------------- -----------------------------public-----------------------------\n"); + for (i = 0; i < NUMKEYS; ++i) { + make_addr(addr, besthashlist[i]); + for (j = 0; j < 16; ++j) printf("%02x", addr[j]); + printf(" "); + for (j = 0; j < 32; ++j) printf("%02x", bestsklist[i][j]); + printf(" "); + for (j = 0; j < 32; ++j) printf("%02x", bestpklist[i][j]); + printf("\n"); + } + + sodium_memzero(bestsklist, NUMKEYS * 32); + sodium_memzero(sk, 32); + + return 0; +} + diff --git a/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-ed25519.c b/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-ed25519.c new file mode 100644 index 0000000..51e9aef --- /dev/null +++ b/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-ed25519.c @@ -0,0 +1,109 @@ +/* +seed: 32 random bytes +sk: sha512(seed) +sk[0] &= 248 +sk[31] &= 127 +sk[31] |= 64 + +pk: scalarmult_ed25519_base(sk) + + +increment seed +generate sk +generate pk +hash = sha512(mypub) + +if besthash: + bestseed = seed + bestseckey = sk + bestpubkey = pk + besthash = hash +*/ + +#include "yggdrasil-brute.h" + + +int main(int argc, char **argv) { + int i; + int j; + time_t starttime; + time_t requestedtime; + + unsigned char bestsklist[NUMKEYS][64]; /* sk contains pk */ + unsigned char besthashlist[NUMKEYS][64]; + + unsigned char seed[32]; + unsigned char sk[64]; + unsigned char pk[32]; + unsigned char hash[64]; + + unsigned int runs = 0; + int where; + + + if (argc != 2) { + fprintf(stderr, "usage: ./yggdrasil-brute-multi-curve25519 \n"); + return 1; + } + + if (sodium_init() < 0) { + /* panic! the library couldn't be initialized, it is not safe to use */ + printf("sodium init failed!\n"); + return 1; + } + + starttime = time(NULL); + requestedtime = atoi(argv[1]); + + if (requestedtime < 0) requestedtime = 0; + fprintf(stderr, "Searching for yggdrasil ed25519 keys (this will take slightly longer than %ld seconds)\n", requestedtime); + + sodium_memzero(bestsklist, NUMKEYS * 64); + sodium_memzero(besthashlist, NUMKEYS * 64); + randombytes_buf(seed, 32); + + do { + /* generate pubkey, hash, compare, increment secret. + * this loop should take 4 seconds on modern hardware */ + for (i = 0; i < (1 << 17); ++i) { + ++runs; + crypto_hash_sha512(sk, seed, 32); + + if (crypto_scalarmult_ed25519_base(pk, sk) != 0) { + printf("scalarmult to create pub failed!\n"); + return 1; + } + memcpy(sk + 32, pk, 32); + + crypto_hash_sha512(hash, pk, 32); + + /* insert into local list of good key */ + where = find_where(hash, besthashlist); + if (where >= 0) { + insert_64(bestsklist, sk, where); + insert_64(besthashlist, hash, where); + randombytes_buf(seed, 32); + } + for (j = 1; j < 31; ++j) if (++seed[j]) break; + } + } while (time(NULL) - starttime < requestedtime || runs < NUMKEYS); + + + fprintf(stderr, "!! Secret key is seed concatenated with public !!\n"); + fprintf(stderr, "---hash--- ------------------------------seed------------------------------ -----------------------------public-----------------------------\n"); + for (i = 0; i < NUMKEYS; ++i) { + for (j = 0; j < 5; ++j) printf("%02x", besthashlist[i][j]); + printf(" "); + for (j = 0; j < 32; ++j) printf("%02x", bestsklist[i][j]); + printf(" "); + for (j = 32; j < 64; ++j) printf("%02x", bestsklist[i][j]); + printf("\n"); + } + + sodium_memzero(bestsklist, NUMKEYS * 64); + sodium_memzero(sk, 64); + sodium_memzero(seed, 32); + + return 0; +} + diff --git a/contrib/yggdrasil-brute-simple/yggdrasil-brute.h b/contrib/yggdrasil-brute-simple/yggdrasil-brute.h new file mode 100644 index 0000000..8e39e0f --- /dev/null +++ b/contrib/yggdrasil-brute-simple/yggdrasil-brute.h @@ -0,0 +1,12 @@ +#include +#include /* printf */ +#include /* memcpy */ +#include /* atoi */ +#include /* time */ + + +#define NUMKEYS 10 +void make_addr(unsigned char addr[32], unsigned char hash[64]); +int find_where(unsigned char hash[64], unsigned char besthashlist[NUMKEYS][64]); +void insert_64(unsigned char itemlist[NUMKEYS][64], unsigned char item[64], int where); +void insert_32(unsigned char itemlist[NUMKEYS][32], unsigned char item[32], int where); From db85a111941c3301f3ce04b9ac12eb6625412286 Mon Sep 17 00:00:00 2001 From: fifteenthcommotion Date: Sun, 12 May 2019 02:18:03 -0700 Subject: [PATCH 2/4] unlicense and spacing perfectionism --- contrib/yggdrasil-brute-simple/LICENSE | 25 ++++++++++++++++++- .../yggdrasil-brute-multi-curve25519.c | 2 -- .../yggdrasil-brute-multi-ed25519.c | 3 --- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/contrib/yggdrasil-brute-simple/LICENSE b/contrib/yggdrasil-brute-simple/LICENSE index 2549ece..68a49da 100644 --- a/contrib/yggdrasil-brute-simple/LICENSE +++ b/contrib/yggdrasil-brute-simple/LICENSE @@ -1 +1,24 @@ -As public domain as possible. Don't blame me if your computer explodes. +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to diff --git a/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-curve25519.c b/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-curve25519.c index f0b6f55..a592f38 100644 --- a/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-curve25519.c +++ b/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-curve25519.c @@ -42,7 +42,6 @@ int main(int argc, char **argv) { unsigned int runs = 0; int where; - if (argc != 2) { fprintf(stderr, "usage: ./yggdrasil-brute-multi-curve25519 \n"); return 1; @@ -104,4 +103,3 @@ int main(int argc, char **argv) { return 0; } - diff --git a/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-ed25519.c b/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-ed25519.c index 51e9aef..02218e5 100644 --- a/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-ed25519.c +++ b/contrib/yggdrasil-brute-simple/yggdrasil-brute-multi-ed25519.c @@ -40,7 +40,6 @@ int main(int argc, char **argv) { unsigned int runs = 0; int where; - if (argc != 2) { fprintf(stderr, "usage: ./yggdrasil-brute-multi-curve25519 \n"); return 1; @@ -88,7 +87,6 @@ int main(int argc, char **argv) { } } while (time(NULL) - starttime < requestedtime || runs < NUMKEYS); - fprintf(stderr, "!! Secret key is seed concatenated with public !!\n"); fprintf(stderr, "---hash--- ------------------------------seed------------------------------ -----------------------------public-----------------------------\n"); for (i = 0; i < NUMKEYS; ++i) { @@ -106,4 +104,3 @@ int main(int argc, char **argv) { return 0; } - From 5bed78c7a71d3cc6e34faed0b688d9472feb75cd Mon Sep 17 00:00:00 2001 From: fifteenthcommotion Date: Sun, 12 May 2019 12:40:45 -0700 Subject: [PATCH 3/4] add CC0 for good measure --- contrib/yggdrasil-brute-simple/LICENSE | 126 +++++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/contrib/yggdrasil-brute-simple/LICENSE b/contrib/yggdrasil-brute-simple/LICENSE index 68a49da..2d61b40 100644 --- a/contrib/yggdrasil-brute-simple/LICENSE +++ b/contrib/yggdrasil-brute-simple/LICENSE @@ -1,3 +1,10 @@ +This software is released into the public domain. As such, it can be +used under the Unlicense or CC0 public domain dedications. + + + +The Unlicense + This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or @@ -22,3 +29,122 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to + + + +CC0 1.0 Universal + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + From 080052ce04245e1c50158651d37060dbb7575e3a Mon Sep 17 00:00:00 2001 From: fifteenthcommotion Date: Sat, 18 May 2019 04:25:57 -0700 Subject: [PATCH 4/4] remove ygg-brute gitignore --- contrib/yggdrasil-brute-simple/.gitignore | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 contrib/yggdrasil-brute-simple/.gitignore diff --git a/contrib/yggdrasil-brute-simple/.gitignore b/contrib/yggdrasil-brute-simple/.gitignore deleted file mode 100644 index 037dde6..0000000 --- a/contrib/yggdrasil-brute-simple/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -* -!.gitignore -!Makefile -!README.md -!LICENSE -!*.c -!*.h