├── LICENSE ├── README.md ├── bloom_filters.go ├── generate ├── Dockerfile └── generate_filters.go └── serverless_bloom_filters.png /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | Copyright 2017 James Thomas 179 | 180 | Licensed under the Apache License, Version 2.0 (the "License"); 181 | you may not use this file except in compliance with the License. 182 | You may obtain a copy of the License at 183 | 184 | http://www.apache.org/licenses/LICENSE-2.0 185 | 186 | Unless required by applicable law or agreed to in writing, software 187 | distributed under the License is distributed on an "AS IS" BASIS, 188 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 189 | See the License for the specific language governing permissions and 190 | limitations under the License. 191 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Serverless Pwned Passwords 2 | 3 | Serverless Pwned Passwords uses serverless functions to provide an API for checking potential passwords against an [enormous corpus of passwords](https://haveibeenpwned.com/Passwords) leaked from security breaches. 4 | 5 | [Bloom filters](https://en.wikipedia.org/wiki/Bloom_filter) generated from the corpus of leaked passwords are used to test for membership. [Go functions](http://jamesthom.as/blog/2017/01/17/openwhisk-and-go/) running on [Apache OpenWhisk](http://openwhisk.incubator.apache.org/) expose an API to check passwords against the list. 6 | 7 | 💪 *Testing a potential password against 320 million leaked passwords takes milliseconds!* 💪 8 | 9 | ![Serverless Bloom Filters](serverless_bloom_filters.png) 10 | 11 | ## usage 12 | 13 | *Need an instance of Apache OpenWhisk to use? Sign up for [IBM Bluemix](https://console.bluemix.net/registration) which comes with a [generous free tier](https://console.bluemix.net/openwhisk/learn/pricing).* 14 | 15 | Having installed the action using instructions below, test the service using the [command-line](https://console.bluemix.net/docs/openwhisk/openwhisk_cli.html#cloud-functions-cli). 16 | 17 | *`bloom_filters` takes a single parameter (`password`) with the potential password. `found` is returned as true if password test was positive.* 18 | 19 | Let's check the most commonly used password of all time…. `password`! 20 | 21 | ``` 22 | $ wsk action invoke bloom_filters --result --param password password 23 | { 24 | "found": true 25 | } 26 | ``` 27 | 28 | Unsurprisingly, this was found in the leaked password corpus. 29 | 30 | What about something else? 31 | 32 | ``` 33 | $ wsk action invoke bloom_filters --result --param password serverless 34 | { 35 | "found": false 36 | } 37 | ``` 38 | 39 | Great, `serverless` was not found and I can keep using it… 😉 40 | 41 | ### web actions 42 | 43 | Exposing our service as a "[web action](https://github.com/apache/incubator-openwhisk/blob/master/docs/webactions.md)" provides a public API endpoint for our serverless function. 44 | 45 | ``` 46 | $ wsk action update bloom_filters --web true 47 | ok: updated action bloom_filters 48 | $ wsk action get bloom_filters --url 49 | ok: got action bloom_filters 50 | https://openwhisk.host/api/v1/web/user@email/default/bloom_filters 51 | ``` 52 | 53 | Allowing us to call it using a normal HTTP request. 54 | 55 | ``` 56 | $ http get https://openwhisk.host/api/v1/web/user@email/default/bloom_filters.json?password=password 57 | { 58 | "found": true 59 | } 60 | ``` 61 | 62 | ### performance 63 | 64 | Looking at the logging output shows performance data for each password check. 65 | 66 | ``` 67 | $ wsk activation logs 2818b2657a7043918cf4495b7b6083ff 68 | 2017-08-15T15:17:18.833465399Z stderr: checking password: password 69 | 2017-08-15T15:17:18.833497727Z stderr: hash: 5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8 70 | 2017-08-15T15:17:18.83350474Z stderr: reading file @ /bloom_filters/5b.dat 71 | 2017-08-15T15:17:18.833509954Z stderr: file contained 2246528 bytes 72 | 2017-08-15T15:17:18.83351495Z stderr: elapsed time: 1.780073ms 73 | 2017-08-15T15:17:18.833519804Z stderr: decoding bloom filter from 2246528 bytes 74 | 2017-08-15T15:17:18.833524969Z stderr: decoded bloom filter parameters -> m: 17971985 k: 10 75 | 2017-08-15T15:17:18.833530802Z stderr: decoding bloom filter took 5.910131ms 76 | 2017-08-15T15:17:18.833535692Z stderr: found password in bloom filter: true 77 | ``` 78 | 79 | 80 | 81 | ## installation 82 | 83 | Follow the instructions below to create the bloom filters, build the runtime image and create the OpenWhisk action. 84 | 85 | *Building and publishing the action runtime image is an optional step. If you would rather skip this step, use this pre-existing Docker image: https://hub.docker.com/r/jamesthomas/bloom_filters/* 86 | 87 | ### download pwned passwords (optional) 88 | 89 | * Download all the password hash files listed at https://haveibeenpwned.com/Passwords 90 | * Extract all files using the [7zip](http://www.7-zip.org/) compression tool. 91 | 92 | *There is a [Homebrew Formula](http://brewformulas.org/P7zip) for installing the tool on OS X.* 93 | 94 | ### generate bloom filters (optional) 95 | 96 | * Install Bloom Filter library 97 | 98 | ``` 99 | $ go get -u github.com/willf/bloom 100 | ``` 101 | 102 | * Run Bloom Filter generator program (`generate/generate_filters.go`) with hash file arguments. 103 | 104 | ``` 105 | $ cd generate 106 | $ go run generate_filters.go pwned-passwords-1.0.txt pwned-passwords-update-1.txt pwned-passwords-update-2.txt 107 | 2017/08/14 17:43:09 Creating Bloom filters with parameters --> n: 17971985 k: 10 108 | 2017/08/14 17:43:09 Initialising 256 bloom filters... 109 | 2017/08/14 17:43:09 Bloom filter buckets: 256 110 | 2017/08/14 17:43:09 Reading hashes from file: pwned-passwords-update-1.txt 111 | 2017/08/14 17:43:10 Processed 1000000 hashes... 112 | ... 113 | 2017/08/14 17:43:19 Added XXX hashes to bloom filters 114 | 2017/08/14 17:43:19 Serialising 256 bloom filters... 115 | 2017/08/14 17:43:19 bucket: d1 encoded bytes: XXX 116 | ... 117 | ``` 118 | 119 | *Generated bloom filters will be serialised to files in the `bloom_filters` directory. Files use the bucket identifier as the file name (`00.dat -> ff.dat`).* 120 | 121 | ### build runtime image (optional) 122 | 123 | *Hosting images on Docker Hub requires registering a (free) account @ https://hub.docker.com/* 124 | 125 | * Build the Docker image for the runtime. 126 | 127 | ``` 128 | $ docker build -t /bloom_filters . 129 | ``` 130 | 131 | * Push Docker image to Docker Hub. 132 | 133 | ``` 134 | $ docker push /bloom_filters 135 | ``` 136 | 137 | ### build openwhisk action 138 | 139 | * Build Go binary for OpenWhisk runtime. 140 | 141 | ``` 142 | $ env GOOS=linux GOARCH=amd64 go build -o exec bloom_filters.go 143 | ``` 144 | 145 | * Add binary to zip file. 146 | 147 | ``` 148 | $ zip action.zip exec 149 | ``` 150 | 151 | ### create openwhisk action 152 | 153 | * Create OpenWhisk action using binary archive file and Docker image. 154 | 155 | ``` 156 | $ wsk action create bloom_filters --docker /bloom_filters action.zip 157 | ``` 158 | 159 | 160 | 161 | ***Once the action has been created, use the instructions above for testing it out.*** 162 | 163 | 164 | 165 | ## customising 166 | 167 | Bloom filters use two parameters to control the probability of false positives, the size of the bit field (*m*) and the number of hashing functions (*k*). 168 | 169 | Given a desired false positive rate and the number of items to be stored, optimal values for these parameters [can be calculated](https://stackoverflow.com/questions/658439/how-many-hash-functions-does-my-bloom-filter-need). Bloom filter calculators exist online: https://hur.st/bloomfilter 170 | 171 | **In this example, ~320 million passwords need to be checked with a false positive rate of 0.001%.** 172 | 173 | Optimal Bloom filter parameter values given these conditions are: 174 | 175 | - *m:* 4,600,828,022 (548.46MB) 176 | - *k:* 10 177 | 178 | Instantiating a Bloom filter of this size would add unacceptable delays [during "cold" invocations](https://read.acloud.guru/does-coding-language-memory-or-package-size-affect-cold-starts-of-aws-lambda-a15e26d12c76). Splitting the password hashes into groups and generating Bloom filters for each group can be used to reduce the Bloom filter size. 179 | 180 | **Password hashes are split into 256 buckets using the first two hex characters from the string.** Each Bloom filter needs to match 1.25M password hashes rather than 320M. 181 | 182 | Bloom filter parameter values given these new conditions are: 183 | 184 | - *m:* 17,971,985 (2.14MB). 185 | - *k:* 10 186 | 187 | Parameters for m and k are stored in the `generate.go` file. 188 | -------------------------------------------------------------------------------- /bloom_filters.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "crypto/sha1" 5 | "encoding/hex" 6 | "encoding/json" 7 | "fmt" 8 | "github.com/willf/bloom" 9 | "io/ioutil" 10 | "log" 11 | "os" 12 | "path/filepath" 13 | "strings" 14 | "time" 15 | ) 16 | 17 | const BloomFileDirectory = "/bloom_filters/" 18 | 19 | func HashString(source string) (hash string) { 20 | hash_bytes := sha1.Sum([]byte(source)) 21 | hex_string := hex.EncodeToString(hash_bytes[:]) 22 | return strings.ToUpper(hex_string) 23 | } 24 | 25 | func BucketForHash(hash string) string { 26 | if len(hash) != 40 { 27 | log.Fatal("invalid hash length, must be 40 characters") 28 | } 29 | return strings.ToLower(hash[0:2]) 30 | } 31 | 32 | func BloomFileForBucket(bucket string) string { 33 | bloomFile := fmt.Sprintf("%s.dat", bucket) 34 | return filepath.Join(BloomFileDirectory, bloomFile) 35 | } 36 | 37 | func DecodedBloomFilter(b []byte) *bloom.BloomFilter { 38 | log.Println("decoding bloom filter from", len(b), "bytes") 39 | filter := bloom.New(1, 1) 40 | start := time.Now() 41 | err := filter.GobDecode(b) 42 | if err != nil { 43 | log.Fatal(err) 44 | } 45 | elapsed := time.Since(start) 46 | log.Println("decoded bloom filter parameters -> m:", filter.Cap(), "k:", filter.K()) 47 | log.Printf("decoding bloom filter took %s", elapsed) 48 | 49 | return filter 50 | } 51 | 52 | func TestBloomForHash(bucket string, hash string) bool { 53 | file := BloomFileForBucket(bucket) 54 | bloom := DecodedBloomFilter(ReadFile(file)) 55 | return bloom.Test([]byte(hash)) 56 | } 57 | 58 | func ReadFile(path string) []byte { 59 | log.Println("reading file @", path) 60 | 61 | start := time.Now() 62 | b, err := ioutil.ReadFile(path) 63 | if err != nil { 64 | log.Fatal(err) 65 | } 66 | elapsed := time.Since(start) 67 | 68 | log.Println("file contained", len(b), "bytes") 69 | log.Printf("elapsed time: %s", elapsed) 70 | 71 | return b 72 | } 73 | 74 | func PrintResponse(found bool) { 75 | msg := map[string]bool{"found": found} 76 | res, err := json.Marshal(msg) 77 | if err != nil { 78 | log.Fatal(err) 79 | } 80 | fmt.Println(string(res)) 81 | } 82 | 83 | func ParseInput() string { 84 | if len(os.Args) < 2 { 85 | log.Fatal("Missing programme argument with input parameters.") 86 | } 87 | arg := os.Args[1] 88 | 89 | var obj map[string]interface{} 90 | json.Unmarshal([]byte(arg), &obj) 91 | password, ok := obj["password"].(string) 92 | if !ok { 93 | log.Fatal("Unable to parse input parameters for password.") 94 | } 95 | 96 | return password 97 | } 98 | 99 | func main() { 100 | password := ParseInput() 101 | log.Println("checking password:", password) 102 | 103 | hash := HashString(password) 104 | bucket := BucketForHash(hash) 105 | log.Println("hash:", hash) 106 | 107 | found := TestBloomForHash(bucket, hash) 108 | log.Println("found password in bloom filter:", found) 109 | PrintResponse(found) 110 | } 111 | -------------------------------------------------------------------------------- /generate/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openwhisk/dockerskeleton 2 | 3 | ADD bloom_filters /bloom_filters/ 4 | -------------------------------------------------------------------------------- /generate/generate_filters.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bufio" 5 | "errors" 6 | "fmt" 7 | "github.com/willf/bloom" 8 | "io/ioutil" 9 | "log" 10 | "os" 11 | "strings" 12 | ) 13 | 14 | const N = uint(17971985) 15 | const K = uint(10) 16 | 17 | func BucketForHash(hash string) (bucket string, err error) { 18 | if len(hash) != 40 { 19 | return "", errors.New("invalid hash length, must be 40 characters") 20 | } 21 | return strings.ToLower(hash[0:2]), nil 22 | } 23 | 24 | func GenerateBloomFilters(buckets int) map[string]*bloom.BloomFilter { 25 | log.Println("Initialising", buckets, "bloom filters...") 26 | filters := make(map[string]*bloom.BloomFilter) 27 | 28 | for i := 0; i < buckets; i++ { 29 | bucket := fmt.Sprintf("%02x", i) 30 | filter := bloom.New(N, K) 31 | filters[bucket] = filter 32 | } 33 | 34 | log.Println("Bloom filter buckets:", len(filters)) 35 | 36 | return filters 37 | } 38 | 39 | func AddHashesToBloomFilters(file string, filters map[string]*bloom.BloomFilter) { 40 | log.Println("Reading hashes from file: ", file) 41 | f, err := os.Open(file) 42 | if err != nil { 43 | log.Fatal(err) 44 | } 45 | 46 | count := 0 47 | scanner := bufio.NewScanner(f) 48 | for scanner.Scan() { 49 | hash := scanner.Text() 50 | bucket, err := BucketForHash(hash) 51 | if err != nil { 52 | log.Fatal(err) 53 | } 54 | 55 | filters[bucket].AddString(hash) 56 | count++ 57 | if (count % 1000000) == 0 { 58 | log.Println("Processed", count, "hashes...") 59 | } 60 | } 61 | if err := scanner.Err(); err != nil { 62 | fmt.Fprintln(os.Stderr, "reading input file:", err) 63 | } 64 | log.Println("Added", count, "hashes to bloom filters") 65 | } 66 | 67 | func SerialiseBloomFilters(filters map[string]*bloom.BloomFilter) { 68 | log.Println("Serialising", len(filters), "bloom filters...") 69 | 70 | if _, err := os.Stat("bloom_filters"); os.IsNotExist(err) { 71 | os.Mkdir("bloom_filters", 0755) 72 | } 73 | 74 | for bucket, filter := range filters { 75 | encoded, err := filter.GobEncode() 76 | log.Println("bucket:", bucket, "encoded bytes:", len(encoded)) 77 | 78 | bloomFile := fmt.Sprintf("bloom_filters/%s.dat", bucket) 79 | err = ioutil.WriteFile(bloomFile, encoded, 0755) 80 | if err != nil { 81 | panic(err) 82 | } 83 | } 84 | } 85 | 86 | func main() { 87 | if len(os.Args) < 2 { 88 | log.Fatal("Missing mandatory hash file argument.") 89 | } 90 | log.Println("Creating Bloom filters with parameters --> n:", N, "k:", K) 91 | filters := GenerateBloomFilters(256) 92 | 93 | for _, file := range os.Args[1:] { 94 | AddHashesToBloomFilters(file, filters) 95 | } 96 | 97 | SerialiseBloomFilters(filters) 98 | } 99 | -------------------------------------------------------------------------------- /serverless_bloom_filters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jthomas/serverless-pwned-passwords/b692f147cecbaf9516ac68df19f585bb512e381b/serverless_bloom_filters.png --------------------------------------------------------------------------------