{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/encpipe/feed/json -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/encpipe", "feed_url": "https://matoken.org/blog/tag/encpipe/feed/json", "language": "ja", "title": "Encpipe – matoken's meme", "items": [ { "id": "https://matoken.org/blog/?p=4360", "url": "https://matoken.org/blog/2025/01/06/encpipe/", "title": "\u30b7\u30f3\u30d7\u30eb\u306a\u6697\u53f7\u5316\u30c4\u30fc\u30eb\u306eEncpipe", "content_html": "
\n\u300cMinisign\u3067\u30d5\u30a1\u30a4\u30eb\u306b\u7f72\u540d\uff0c\u691c\u8a3c\u300d\u306eMinisign\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u305fEncpipe\u3092\u5c11\u3057\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e
\n\n
$ git clone https://github.com/jedisct1/encpipe\n$ cd encpipe\n$ make\n
$ ./encpipe\nUsage:\n encpipe -G\n encpipe {-e | -d} {-p <string> | -P <file>} [-i <file>] [-o <file>]\n\nOptions:\n -G, --passgen generate a random password\n -e, --encrypt encryption mode\n -d, --decrypt decryption mode\n -p, --pass <password> use <password>\n -P, --passfile <file> read password from <file>\n -i, --in <file> read input from <file>\n -o, --out <file> write output to <file>\n -h, --help print this message\n
$ ./encpipe -G\n208294fbcff996f8c859d54d1c8f7d8ac4c0c813a0867abb5b76830c2aa8ac1a\n$ ./encpipe -G\n311259951f2bfdf5464be05e7eedb88159bf23fdc066adbf89266effea2f9556\n$ ./encpipe -G | wc -c\n65\n
$ ./encpipe --encrypt \\ (1)\n -p 'fcfd940ac76997530341232fa3ee32f39a6b40a0477af1c138e6d21d921ae97a' \\ (2)\n -i ./README.md \\ (3)\n -o ./README.md.encpipe (4)\n $ cat ./README.md.encpipe | od -xc | head -4\n0000000 0474 0000 fb09 d6fb 2524 8820 9261 b74c\n t 004 \\0 \\0 \\t 373 373 326 $ % 210 a 222 L 267\n0000020 fb04 c95f 0df6 218c 1ff5 4a4a 5272 685f\n 004 373 _ 311 366 \\r 214 ! 365 037 J J r R _ h\n
\u6697\u53f7\u5316\u30e2\u30fc\u30c9
\n\u30d1\u30b9\u30ef\u30fc\u30c9\u6587\u5b57\u5217\u6307\u5b9a
\n\u6697\u53f7\u5316\u5bfe\u8c61\u30d5\u30a1\u30a4\u30eb
\n\u6697\u53f7\u5316\u51fa\u529b\u30d5\u30a1\u30a4\u30eb
\n$ ./encpipe --decrypt \\ (1)\n -p 'fcfd940ac76997530341232fa3ee32f39a6b40a0477af1c138e6d21d921ae97a' \\ (2)\n -i ./README.md.encpipe \\ (3)\n -o - | \\ (4)\n head -6\n\n\nEncpipe\n=======\n\nThe dum^H^H^Hsimplest encryption tool in the world.\n
\u5fa9\u53f7\u5316\u30e2\u30fc\u30c9
\n\u30d1\u30b9\u30ef\u30fc\u30c9\u6587\u5b57\u5217
\n\u5165\u529b\u30d5\u30a1\u30a4\u30eb
\n\u51fa\u529b\u30d5\u30a1\u30a4\u30eb(-\u3067\u6a19\u6e96\u51fa\u529b\u306b)
\n$ cat README.md | zstd | ./encpipe -e -p 'easy-pass' -i - -o - > README.md.zstd.encpipe\n$ cat README.md.zstd.encpipe | ./encpipe -d -p 'easy-pass' -i - -o - | zstdcat | head -4\n\n\nEncpipe\n=======\n
$ nc -l 6666 | ./encpipe -d -p 'pass' (1)\n$ ./encpipe -e -p 'pass' -i ./README.md | nc 127.0.0.1 6666 (2)\n
\u53d7\u3051\u53d6\u308a\u5074\u306e\u6e96\u5099\uff0cnc\u3067tcp:6666\u3067\u5f85\u3061\u53d7\u3051\u3066\u7d50\u679c\u3092Encpipe\u3067\u5fa9\u53f7
\n\u9001\u4fe1\u5074\uff0cEncpipe\u3067\u6697\u53f7\u5316\uff0cnc\u306b\u6d41\u3057\u8fbc\u307f
\n$ time dd if=/dev/zero bs=1M count=1024 2>/dev/null | ./encpipe -e -p `./encpipe -G` > /dev/null\n\nreal 0m53.818s\nuser 0m53.378s\nsys 0m0.720s\n$ time dd if=/dev/zero bs=1M count=1024 2>/dev/null | GPG_TTY=$(tty) gpg -e -r matoken@gmail.com > /dev/null\n\nreal 0m5.883s\nuser 0m5.574s\nsys 0m0.644s\n
Encpipe\u306f\u6848\u5916\u9045\u3044\uff0e
\n\n Note \n | \n\n\u3053\u306e\u3068\u304d\u306egpg\u306e\u6697\u53f7\u65b9\u5f0f\u306fAES256.CFB\uff0e\n | \n
\u306a\u305c\u3053\u306e\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u305f\u306e\u304b\u3068\u3044\u3046\u3068GnuPG\u3084OpenSSL\u306e\u5229\u7528\u65b9\u6cd5\u3092\u899a\u3048\u308b\u3088\u308a\u4f7f\u3063\u305f\u307b\u3046\u304c\u901f\u3044\u304b\u3089\u3060\u305d\u3046\u3067\u3059\uff0e\u305f\u3057\u304b\u306b\u3053\u308c\u3089\u306e\u30c4\u30fc\u30eb\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u591a\u304f\u5927\u5909\u3067\u3059\u306d\u2026\u2026\uff0e
\n$ git log --pretty=oneline -1\n7156490a5fa8e0cd1da748451840dfed2d82fe4b (HEAD -> master, origin/master, origin/HEAD) Bump year\n$ dpkg-query -W gcc make gpg zstd\ngcc 4:14.2.0-1\ngpg 2.2.45-2\nmake 4.4.1-1\nzstd 1.5.6+dfsg-2\n$ lsb_release -dr\nDescription: Debian GNU/Linux trixie/sid\nRelease: n/a\n$ arch\nx86_64\n