<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>Nerdling Sapple</title>
	<link>https://www.zx2c4.com/</link>
	<description>{{{ ZX2C4 &#124; Jason A. Donenfeld }}}</description>
	<language>en-US</language>
	<copyright>Copyright 1996-2021 Jason A. Donenfeld. All Rights Reserved.</copyright>
	<atom:link href="https://www.zx2c4.com/feed.xml" rel="self" type="application/rss+xml" />
	<item>
		<title>WireGuard in Google Summer of Code</title>
		<link>https://www.wireguard.com/gsoc/</link>
		<guid isPermaLink="true">https://www.wireguard.com/gsoc/</guid>
		<pubDate>Mon, 19 Feb 2018 15:55:21 +0100</pubDate>
		<description>&lt;p&gt;WireGuard is &lt;a href="https://www.wireguard.com/gsoc/"&gt;participating in Google Summer of Code 2018&lt;/a&gt;. If you're a student &#x2014; bachelors, masters, PhD, or otherwise &#x2014; who would like to be funded this summer for writing interesting kernel code, studying cryptography, building networks, making mobile apps, contributing to the larger open source ecosystem, doing web development, writing documentation, or working on a wide variety of interesting problems, then this may be appealing. You'll be mentored by world-class experts, and the summer will certainly boost your skills. &lt;a href="https://www.wireguard.com/gsoc/"&gt;Details are on this page&lt;/a&gt; &#x2014; simply contact the WireGuard team to get a proposal into the pipeline.</description>
	</item>
	<item>
		<title>WireGuard, Secure Network Tunnel with Modern Crypto</title>
		<link>https://www.wireguard.com/</link>
		<guid isPermaLink="true">https://www.wireguard.com/</guid>
		<pubDate>Mon, 04 Jul 2016 23:29:22 +0200</pubDate>
		<description>&lt;p&gt;&lt;a href="https://www.wireguard.com/"&gt;&lt;img src="https://www.wireguard.com/img/wireguard.svg" width="90%" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;After quite a bit of hard work, I've at long last launched &lt;a href="https://www.wireguard.com/"&gt;WireGuard&lt;/a&gt;, a secure network tunnel that uses modern crypto, is extremely fast, and is easy and pleasurable to use. You can read about it at the website, but in short, it's based on the simple idea of an association between public keys and permitted IP addresses. Along the way it uses some nice crypto trick to achieve it's goal. For performance it lives in the kernel, though cross-platform versions in safe languages like Rust, Go, etc are on their way.&lt;/p&gt;&#10;&lt;p&gt;The launch was wildly successful. About 10 minutes after I ran &lt;code&gt;/etc/init.d/nginx restart&lt;/code&gt;, somebody had already put it on Hacker News and the Twitter sphere, and within 24 hours I had received 150,000 unique IPs. The reception has been very warm, and the &lt;a href="https://lists.zx2c4.com/mailman/listinfo/wireguard"&gt;mailing list&lt;/a&gt; has already started to get some patches. Distro maintainers have stepped up and packages are being prepared. There are currently &lt;a href="https://www.wireguard.com/install/"&gt;packages&lt;/a&gt; for Gentoo, Arch, Debian, and OpenWRT, which is very exciting.&lt;/p&gt;&#10;&lt;p&gt;Although it's still experimental and not yet in final stable/secure form, I'd be interested in general feedback from experimenters and testers.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://www.wireguard.com/img/walkthrough.gif"&gt;&lt;/p&gt;</description>
	</item>
	<item>
		<title>New Company: Edge Security</title>
		<link>https://www.edgesecurity.com/</link>
		<guid isPermaLink="true">https://www.edgesecurity.com/</guid>
		<pubDate>Tue, 10 May 2016 16:48:50 +0200</pubDate>
		<description>&lt;p&gt;I've just launched a website for my new information security consulting company, &lt;a href="https://www.edgesecurity.com/"&gt;Edge Security&lt;/a&gt;. We're expert hackers, with a fairly diverse skill set and a lot of experience. I mention this here because in a few months we plan to release an open-source kernel module for Linux called &lt;a href="https://www.wireguard.com/"&gt;WireGuard&lt;/a&gt;. No details yet, but keep your eyes open in this space.&lt;/p&gt;</description>
	</item>
	<item>
		<title>Hasp HL Library</title>
		<link>https://git.zx2c4.com/hasplib/about/</link>
		<guid isPermaLink="true">https://git.zx2c4.com/hasplib/about/</guid>
		<pubDate>Sun, 06 Mar 2016 14:10:12 +0100</pubDate>
		<description>&lt;h1&gt;Hasp HL Library&lt;/h1&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;git clone https://git.zx2c4.com/hasplib&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;The Hasp HL is a copy protection dongle that ships horrible closed-source drivers.&lt;/p&gt;&#10;&lt;p&gt;This is a very simple OSS library based on &lt;code&gt;libusb&lt;/code&gt; for accessing MemoHASP&#10;functions of the Hasp HL USB dongle. It currently can view the ID of a dongle,&#10;validate the password, read from memory locations, and write to memory&#10;locations.&lt;/p&gt;&#10;&lt;p&gt;This library allows use of the dongle &lt;strong&gt;without any drivers&lt;/strong&gt;!&lt;/p&gt;&#10;&lt;h2&gt;API&lt;/h2&gt;&#10;&lt;p&gt;Include &lt;code&gt;hasplib.h&lt;/code&gt;, and compile your application alongside &lt;code&gt;hasplib.c&lt;/code&gt;&#10;and optionally &lt;code&gt;hasplib-simple.c&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h3&gt;Main Functions&lt;/h3&gt;&#10;&lt;p&gt;Get a list of all connected dongles:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;size_t hasp_find_dongles(hasp_dongle ***dongles);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Login to that dongle using the password, and optionally view the memory size:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;bool hasp_login(hasp_dongle *dongle, uint16_t password1, uint16_t password2, uint16_t *memory_size);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Instead of the first two steps, you can also retreive the first connected&#10;dongle that fits your password:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;hasp_dongle *hasp_find_login_first_dongle(uint16_t password1, uint16_t password2);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Read the ID of a dongle:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;bool hasp_id(hasp_dongle *dongle, uint32_t *id);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Read from a memory location:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;bool hasp_read(hasp_dongle *dongle, uint16_t location, uint16_t *value);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Write to a memory location:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;bool hasp_write(hasp_dongle *dongle, uint16_t location, uint16_t value);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Free the list of dongles opened earlier:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;void hasp_free_dongles(hasp_dongle **dongles);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Free a single dongle:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;void hasp_free_dongle(hasp_dongle *dongle);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;h3&gt;Simple Functions&lt;/h3&gt;&#10;&lt;p&gt;The simple API wraps the main API and provides access to a default dongle, which is the&#10;first connected dongle that responds to the given passwords. It handles dongle disconnects&#10;and reconnections.&lt;/p&gt;&#10;&lt;p&gt;Create a &lt;code&gt;hasp_simple *&lt;/code&gt; object for a given password pair:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;hasp_simple *hasp_simple_login(uint16_t password1, uint16_t password2);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Free this object:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;void hasp_simple_free(hasp_simple *simple);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Read an ID, returning 0 if an error occurred:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;uint32_t hasp_simple_id(hasp_simple *simple);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Read a memory location, returning 0 if an error occurred:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;uint16_t hasp_simple_read(hasp_simple *simple, uint16_t location);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Write to a memory location, returning its success:&lt;/p&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;bool hasp_simple_write(hasp_simple *simple, uint16_t location, uint16_t value);&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;h2&gt;Licensing&lt;/h2&gt;&#10;&lt;p&gt;This is released under the GPLv3. See &lt;code&gt;COPYING&lt;/code&gt; for more information. If you&#10;need a less restrictive license, please contact me.&lt;/p&gt;</description>
	</item>
	<item>
		<title>ctmg: a Linux-native bash script Truecrypt replacement</title>
		<link>https://git.zx2c4.com/ctmg/about/</link>
		<guid isPermaLink="true">https://git.zx2c4.com/ctmg/about/</guid>
		<pubDate>Tue, 23 Feb 2016 17:07:53 +0100</pubDate>
		<description>&lt;h2&gt;&lt;code&gt;ctmg&lt;/code&gt; - extremely simple encrypted container system&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;ctmg&lt;/code&gt; is an encrypted container manager for Linux using &lt;code&gt;cryptsetup&lt;/code&gt; and various standard file system utilities. Containers have the extension &lt;code&gt;.ct&lt;/code&gt; and are mounted at a directory of the same name, but without the extension. Very simple to understand, and very simple to implement; &lt;code&gt;ctmg&lt;/code&gt; is a simple bash script.&lt;/p&gt;&#10;&lt;h3&gt;Usage&lt;/h3&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;Usage: ctmg [ &lt;span style="color: #008800; font-weight: bold"&gt;new&lt;/span&gt; | delete | open | close | list ] [&lt;span style="color: #008800; font-weight: bold"&gt;arguments&lt;/span&gt;...]&#10;  ctmg &lt;span style="color: #008800; font-weight: bold"&gt;new&lt;/span&gt;    container_path container_size[units_suffix]&#10;  ctmg delete container_path&#10;  ctmg open   container_path&#10;  ctmg close  container_path&#10;  ctmg list&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Calling &lt;code&gt;ctmg&lt;/code&gt; with no arguments will call &lt;code&gt;list&lt;/code&gt; if there are any containers open, and otherwise show the usage screen. Calling &lt;code&gt;ctmg&lt;/code&gt; with a filename argument will call &lt;code&gt;open&lt;/code&gt; if it is not already open and otherwise will call &lt;code&gt;close&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h3&gt;Examples&lt;/h3&gt;&#10;&lt;h4&gt;Create a 100MiB encrypted container called "example"&lt;/h4&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;zx2c4@thinkpad ~ $ ctmg create example 100MiB&#10;[#] truncate -s 100MiB /home/zx2c4/example.ct&#10;[#] cryptsetup --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --batch-mode luksFormat /home/zx2c4/example.ct&#10;Enter passphrase:&#10;[#] chown 1000:1000 /home/zx2c4/example.ct&#10;[#] cryptsetup luksOpen /home/zx2c4/example.ct ct_example&#10;Enter passphrase for /home/zx2c4/example.ct:&#10;[#] mkfs.ext4 -q -E root_owner=1000:1000 /dev/mapper/ct_example&#10;[+] Created new encrypted container at /home/zx2c4/example.ct&#10;[#] cryptsetup luksClose ct_example&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;h4&gt;Open a container, add a file, and then close it&lt;/h4&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;zx2c4@thinkpad ~ $ ctmg open example&#10;[#] cryptsetup luksOpen /home/zx2c4/example.ct ct_example&#10;Enter passphrase for /home/zx2c4/example.ct: &#10;[#] mkdir -p /home/zx2c4/example&#10;[#] mount /dev/mapper/ct_example /home/zx2c4/example&#10;[+] Opened /home/zx2c4/example.ct at /home/zx2c4/example&#10;zx2c4@thinkpad ~ $ echo &amp;quot;super secret&amp;quot; &amp;gt; example/mysecretfile.txt&#10;zx2c4@thinkpad ~ $ ctmg close example&#10;[#] umount /home/zx2c4/example&#10;[#] cryptsetup luksClose ct_example&#10;[#] rmdir /home/zx2c4/example&#10;[+] Closed /home/zx2c4/example.ct&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;h3&gt;Installation&lt;/h3&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;$ git clone https://git.zx2c4.com/ctmg&#10;$ &lt;span style="color: #003388"&gt;cd&lt;/span&gt; ctmg&#10;$ sudo make install&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;p&gt;Or, use the package from your distribution:&lt;/p&gt;&#10;&lt;h4&gt;Gentoo&lt;/h4&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;# emerge ctmg&#10;&lt;/pre&gt;&lt;/div&gt;</description>
	</item>
	<item>
		<title>Git Daemon Dummy: 301 Redirects for git://</title>
		<link>https://git.zx2c4.com/git-daemon-dummy/about/</link>
		<guid isPermaLink="true">https://git.zx2c4.com/git-daemon-dummy/about/</guid>
		<pubDate>Tue, 23 Feb 2016 03:35:13 +0100</pubDate>
		<description>&lt;h1&gt;Git Daemon Dummy: 301 Redirects for &lt;code&gt;git://&lt;/code&gt;&lt;/h1&gt;&#10;&lt;p&gt;With the wide deployment of HTTPS, the plaintext nature of &lt;code&gt;git://&lt;/code&gt;&#10;is becoming less and less desirable. In order to inform users of&#10;the &lt;code&gt;git://&lt;/code&gt;-based URIs to switch to &lt;code&gt;https://&lt;/code&gt;-based URIs, while&#10;still being able to shut down aging &lt;code&gt;git-daemon&lt;/code&gt; infrastructure,&#10;this &lt;code&gt;git-daemon-dummy&lt;/code&gt; is an extremely lightweight daemon that&#10;simply provides an informative error message to connecting &lt;code&gt;git://&lt;/code&gt;&#10;users, providing the new URI.&lt;/p&gt;&#10;&lt;p&gt;It drops all privileges, &lt;code&gt;chroot&lt;/code&gt;s, sets &lt;code&gt;rlimit&lt;/code&gt;s, and uses &lt;code&gt;seccomp-bpf&lt;/code&gt; to limit the&#10;amount of available syscalls. To remain high performance, it makes&#10;use of &lt;code&gt;epoll&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h3&gt;Example&lt;/h3&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;zx2c4@thinkpad ~ $ git clone git://git.zx2c4.com/cgit&#10;Cloning into &amp;#39;cgit&amp;#39;...&#10;fatal: remote error: &#10;******************************************************&#10;&#10;  This git repository has moved! Please clone with:&#10;&#10;      $ git clone https://git.zx2c4.com/cgit&#10;&#10;******************************************************&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;h3&gt;Installation&lt;/h3&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;$ git clone https://git.zx2c4.com/git-daemon-dummy&#10;$ &lt;span style="color: #003388"&gt;cd&lt;/span&gt; git-daemon-dummy&#10;$ make&#10;$ ./git-daemon-dummy&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10;&#10;&lt;h3&gt;Usage&lt;/h3&gt;&#10;&lt;div style="background: #ffffff"&gt;&lt;pre style="line-height: 125%"&gt;&lt;span&gt;&lt;/span&gt;Usage: ./git-daemon-dummy [OPTION]...&#10;  -d, --daemonize              run as a background daemon&#10;  -f, --foreground             run in the foreground (default)&#10;  -P FILE, --pid-file=FILE     write pid of listener process to FILE&#10;  -p PORT, --port=PORT         listen on port PORT (default=9418)&#10;  -h, --help                   display this message&#10;&lt;/pre&gt;&lt;/div&gt;</description>
	</item>
</channel>
</rss>
