generated from neumannjs/Janos-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1 lines (1 loc) · 16.2 KB
/
index.html
1
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=description content="Gijs van Dam is a freelance consultant and crypto researcher with over 20 years of international experience, who tries to make the web a better place."><link rel="shortcut icon" href=/favicon.ico><link rel=apple-touch-icon sizes=57x57 href=/apple-icon-57x57.png><link rel=apple-touch-icon sizes=60x60 href=/apple-icon-60x60.png><link rel=apple-touch-icon sizes=72x72 href=/apple-icon-72x72.png><link rel=apple-touch-icon sizes=76x76 href=/apple-icon-76x76.png><link rel=apple-touch-icon sizes=114x114 href=/apple-icon-114x114.png><link rel=apple-touch-icon sizes=120x120 href=/apple-icon-120x120.png><link rel=apple-touch-icon sizes=144x144 href=/apple-icon-144x144.png><link rel=apple-touch-icon sizes=152x152 href=/apple-icon-152x152.png><link rel=apple-touch-icon sizes=180x180 href=/apple-icon-180x180.png><link rel=icon type=image/png sizes=192x192 href=/android-icon-192x192.png><link rel=icon type=image/png sizes=32x32 href=/favicon-32x32.png><link rel=icon type=image/png sizes=96x96 href=/favicon-96x96.png><link rel=icon type=image/png sizes=16x16 href=/favicon-16x16.png><link rel=manifest href=/manifest.json><meta name=msapplication-TileColor content=#ffffff><meta name=msapplication-TileImage content=/ms-icon-144x144.png><meta name=theme-color content=#ffffff><title>Gijs van Dam</title><link href=/styles/main.css rel=stylesheet><link rel=alternate type=application/rss+xml title="Gijs van Dam" href=/rss.xml><link rel=webmention href=https://webmention.io/www.gijsvandam.nl/webmention><link rel=pingback href=https://webmention.io/www.gijsvandam.nl/xmlrpc><link rel=authorization_endpoint href=https://janos-githubproxy.azurewebsites.net/api/authorize/gijswijs/gijswijs.github.io><link rel=token_endpoint href=https://janos-githubproxy.azurewebsites.net/api/token/gijswijs/gijswijs.github.io><link rel=microsub href=https://aperture.p3k.io/microsub/636><link rel=micropub href=https://janos-githubproxy.azurewebsites.net/api/micropub/gijswijs/gijswijs.github.io></head><body class=home><header>Gijs van Dam<nav><ul><li><a href=/ title=Home>Home</a></li><li><a href=/research title=Research>Research</a></li><li><a href=/open-source title="Open Source">Open Source</a></li><li><a href=/ventures title=Ventures>Ventures</a></li><li><a href=/resume title=Resume>Resume</a></li><li><a href=/about title=About>About</a></li><li><a href=/now title=Now>Now</a></li><li><a href=/contact title=Contact>Contact</a></li></ul></nav></header><main><ul><li><article><header><h1><a href=/post/the-effect-of-multi-part-payments-on-the-balance-disovery-attack>The effect of multi-part payments on the Balance Disovery Attack</a></h1><span><time class=dt-published datetime=2023-09-22T00:00:00Z>September 22, 2023</time> <span class=reading-time>8 minute read</span></span><ul><li><a class=p-category href=/topics/pss/ >PSS</a></li><li><a class=p-category href=/topics/lightning-network/ >lightning network</a></li><li><a class=p-category href=/topics/mpp/ >MPP</a></li><li><a class=p-category href=/topics/bda/ >BDA</a></li></ul></header><section><p>My PhD research is mainly on the Balance Discovery Attack (BDA). The BDA was introduced (in academia) by <a href=https://doi.org/10.1145/3321705.3329812 title="On the Difficulty of Hiding the Balance of Lightning Network Channels (2019)">Herrera-Joancomartí et al.</a>. In their paper they used the term balance discovery attack and balance disclosure attack interchangeably. Nowadays the term probing or probing attack is more commonly used, but I prefer BDA, so I'll keep using that while shouting at the clouds.</p><p>The BDA is an attack on privacy. It can be used to discover balances of payment channels, but when used over a longer period of time it can also be used to detect actual payments. These are things we want to keep private, so it is interesting to look at ways of preventing this data from being leaked. Multi-part payments, and more specifically Payments Split & Switch (PSS) has some surprising effects that can prevent data from being leaked in ways that I will try to explain in this post.</p></section></article></li><li><article><header><h1><a href=/post/all-types-of-multi-part-payments-in-lightning-network-explained>All types of multi-part payments in Lightning Network explained</a></h1><span><time class=dt-published datetime=2023-09-15T00:00:00Z>September 15, 2023</time> <span class=reading-time>10 minute read</span></span><ul><li><a class=p-category href=/topics/pss/ >PSS</a></li><li><a class=p-category href=/topics/lightning-network/ >lightning network</a></li><li><a class=p-category href=/topics/bitcoin/ >bitcoin</a></li><li><a class=p-category href=/topics/mpp/ >MPP</a></li><li><a class=p-category href=/topics/amp/ >AMP</a></li></ul></header><section><p>Lightning Network uses source-based routing. What that means is that the sender is responsible for finding a route to the payee. But because the sender doesn't know the balances of all channels along a possible route, the proposed route can fail for lack of liquidity. So the sender is forced to try routes until it stumbles upon one that has enough liquidity to relay the payment; it's a process of trial and error. To increase the likelihood of success the idea of splitting up a payments into smaller parts was floated early on in the development of Lightning Network. The idea was that multiple smaller payments were more likely to succeed than one big payment. But you still want all separate parts of such a payment to act as one single atomic payment, that either succeeds completely or doesn't succeed at all.</p></section></article></li><li><article><header><h1><a href=/post/why-does-signature-half-aggregation-break-adaptor-signatures>Why does signature half aggregation break adaptor signatures?</a></h1><span><time class=dt-published datetime=2022-04-04T00:00:00Z>April 4, 2022</time> <span class=reading-time>6 minute read</span></span><ul><li><a class=p-category href=/topics/cryptography/ >cryptography</a></li><li><a class=p-category href=/topics/lightning-network/ >lightning network</a></li><li><a class=p-category href=/topics/bitcoin/ >bitcoin</a></li></ul></header><section><p>There is this cool trick you can do with Schnorr signatures. It is called Adaptor Signature (AS). An adaptor signature is an extra signature that, combined with the original signature, allow for revealing a value that was previously hidden. You can use this trick to solve trust problems as they appear in atomic swaps, coin swaps and Discreet Log Contracts (DLCs).</p><p>Signature Aggregation (SA) is a way to aggregate multiple signatures into a single signature. The single aggregate signature is smaller (in bytes) than the original signatures combined. It reduces transaction weight, meaning we can have more transactions per block, which is always a good thing. It's like 7zip for transactions. Signature <em>Half</em> Aggregation is a variant of SA that only aggregates half of each signature. It offers less compression, but it has the benefit of not requiring any interaction with the signers, whereas full aggregation does require cooperation of all the signers.</p><p>So two cool tricks, but the latter breaks the former when it is used for blockwide signature aggregation. This article explains the math behind it and why SA breaks AS</p></section></article></li><li><article><header><h1><a href=/post/how-do-payments-in-lightning-network-work>How do payments in Lightning Network work?</a></h1><span><time class=dt-published datetime=2022-03-11T00:00:00Z>March 11, 2022</time> <span class=reading-time>7 minute read</span></span><ul><li><a class=p-category href=/topics/cryptography/ >cryptography</a></li><li><a class=p-category href=/topics/lightning-network/ >lightning network</a></li><li><a class=p-category href=/topics/bitcoin/ >bitcoin</a></li></ul></header><section><p>Lightning Network is a peer-to-peer payment network that runs on top of the Bitcoin Blockchain. Because it runs on top of the Blockchain it is called a <em>layer-two solution</em>, which groups it together with other solutions that have this property of being built on top of a Blockchain. <em>Layer One</em> is the base layer, where the Blockchain lives. Because of the inherent properties of Layer One, it is impossible to process large amounts of transactions in that layer. The Bitcoin Blockchain can famously process a mere seven transactions per second on average. This constraint was the main impetus for the creation of Layer Two solutions. Lightning Network, being a Layer Two solution, allows for near instant transactions, that can easily scale to millions of transactions per second.</p></section></article></li><li><article><header><h1><a href=/post/image-conversion-resizing-and-compression-with-webassembly>Image conversion, resizing and compression with WebAssembly</a></h1><span><time class=dt-published datetime=2021-03-31T00:00:00Z>March 31, 2021</time> <span class=reading-time>5 minute read</span></span><ul><li><a class=p-category href=/topics/webassembly/ >webassembly</a></li><li><a class=p-category href=/topics/janos/ >janos</a></li></ul></header><section><p>Image conversion and resizing for the web can be quite fiddly. Take responsive websites for instance. You want to show a smaller version of your image on smaller devices: You don't need to download a 1080px wide image to show on a 360px wide device, especially since that device is likely constrained in the amount of bandwidth it has. Then again when your website is shown on an ultra HD screen with 3840x2160 resolution 1080 is maybe even too small.</p><p>Apart from multiple sizes, you also want to offer multiple formats. Modern browsers support new(er) image formats like webp and avif offer better compression for comparable image quality. Using these formats you can decrease the total download size of your page, while improving the overall experience for the user. But you just can't assume (yet) that all browsers support those newer formats, so you have to provide older formats as a fallback option. All in all the amount of different files you have to offer for just a single image on a web page starts to become quite large and the whole thing becomes, like I said, fiddly.</p></section></article></li><li><article><header><h1><a href=/post/measuring-your-writing-progress-with-a-git-word-count>Measuring your writing progress with a git word count</a></h1><span><time class=dt-published datetime=2021-02-26T00:00:00Z>February 26, 2021</time> <span class=reading-time>5 minute read</span></span><ul><li><a class=p-category href=/topics/boilerplate-paper/ >boilerplate paper</a></li><li><a class=p-category href=/topics/powershell/ >powershell</a></li><li><a class=p-category href=/topics/git/ >git</a></li><li><a class=p-category href=/topics/bash/ >bash</a></li></ul></header><section><p>Writing a scientific paper is hard. Doing your PhD is hard. Writing your thesis is hard. And to make me feel even more miserable I decided to measure my progress by counting the net change in words I achieve throughout each day. I am by no means a productivity guru and I don't know whether word count is a useful indicator for measuring the progress of a paper. That being said, it is a reality check to see how fast my work is progressing. So without further ado here's the Powershell command that outputs the wordcount for the last 25 days based on git commits. (For the bash command, see the bottom of this post)</p><pre><code class=language-powershell>for($i = 0; $i -lt 25; $i++){$j = $i + 1; Write-Host (get-date (get-date).addDays(-$i) -UFormat "%Y%m%d") ((git diff --word-diff=porcelain "@{$j days ago}" "@{$i days ago}" -- "***.md"| Select-String -Pattern "^\+.*" | Measure-Object -word | select -ExpandProperty Words) - (git diff --word-diff=porcelain "@{$j days ago}" "@{$i days ago}" -- "***.md"| Select-String -Pattern "^-.*" | Measure-Object -word | select -ExpandProperty Words)) }</code></pre></section></article></li><li class=article-pagination><a href=/posts/2 class=article-pagination-left>Older posts</a></li></ul><aside><h2>About</h2><div class=h-card><img src=/images/gijsvandam.jpg alt="Gijs van Dam" class="author-portrait u-photo"><p class=p-note><a class="p-name u-url" href=/ >Gijs van Dam</a> is a <a href=/about>researcher, consultant and business founder</a>, with more than 20 years of experience. In 2024 he obtained his PhD in computer science at the National University of Malaysia. Gijs lives in Amsterdam.</p></div><h2>Tags</h2><ul><li><a href=/topics/pss/ >PSS (2)</a></li><li><a href=/topics/lightning-network/ >lightning network (6)</a></li><li><a href=/topics/mpp/ >MPP (2)</a></li><li><a href=/topics/bda/ >BDA (1)</a></li><li><a href=/topics/bitcoin/ >bitcoin (4)</a></li><li><a href=/topics/windows-10/ >windows 10 (1)</a></li><li><a href=/topics/lnd/ >lnd (1)</a></li><li><a href=/topics/simverse/ >simverse (2)</a></li><li><a href=/topics/vscode/ >vscode (2)</a></li><li><a href=/topics/cryptography/ >cryptography (2)</a></li><li><a href=/topics/webassembly/ >webassembly (1)</a></li><li><a href=/topics/janos/ >janos (6)</a></li><li><a href=/topics/boilerplate-paper/ >boilerplate paper (3)</a></li><li><a href=/topics/powershell/ >powershell (1)</a></li><li><a href=/topics/git/ >git (1)</a></li><li><a href=/topics/bash/ >bash (1)</a></li><li><a href=/topics/pandoc/ >pandoc (2)</a></li><li><a href=/topics/lua/ >lua (1)</a></li><li><a href=/topics/latex/ >LaTeX (1)</a></li><li><a href=/topics/revealjs/ >revealjs (1)</a></li><li><a href=/topics/amp/ >AMP (1)</a></li><li><a href=/topics/c-lightning/ >c-lightning (1)</a></li><li><a href=/topics/ssh/ >ssh (1)</a></li><li><a href=/topics/indieweb/ >indieweb (5)</a></li><li><a href=/topics/test1/ >test1 (2)</a></li><li><a href=/topics/test2/ >test2 (1)</a></li><li><a href=/topics/science/ >science (1)</a></li><li><a href=/topics/crypto/ >crypto (1)</a></li></ul></aside></main><footer><nav><ul><li><a href=/ title=Home>Home</a></li><li><a href=/research title=Research>Research</a></li><li><a href=/open-source title="Open Source">Open Source</a></li><li><a href=/ventures title=Ventures>Ventures</a></li><li><a href=/resume title=Resume>Resume</a></li><li><a href=/about title=About>About</a></li><li><a href=/now title=Now>Now</a></li><li><a href=/contact title=Contact>Contact</a></li></ul></nav><ul><li><div itemscope itemtype=https://schema.org/Person><a itemprop=sameAs content=https://www.github.com/gijswijs href=https://www.github.com/gijswijs rel="noreferrer noopener me" target=_blank title=Github>Github</a></div></li><li><div itemscope itemtype=https://schema.org/Person><a itemprop=sameAs content=https://www.linkedin.com/in/gijsvandam/ href=https://www.linkedin.com/in/gijsvandam/ rel="noreferrer noopener me" target=_blank title=LinkedIn>LinkedIn</a></div></li><li><div itemscope itemtype=https://schema.org/Person><a itemprop=sameAs content=https://www.researchgate.net/profile/Gijs_Van_Dam2 href=https://www.researchgate.net/profile/Gijs_Van_Dam2 rel="noreferrer noopener me" target=_blank title=ResearchGate>ResearchGate</a></div></li><li><a href=/feed rel=feed target=_self title=Stream>Stream</a></li><li><a href=/rss.xml rel="" target=_blank title=RSS>RSS</a></li><li><div itemscope itemtype=https://schema.org/Person><a itemprop=sameAs content=https://keybase.io/gijsvandam href=https://keybase.io/gijsvandam rel="noreferrer noopener me" target=_blank title=Keybase>Keybase</a></div></li><li><div itemscope itemtype=https://schema.org/Person><a itemprop=sameAs content=https://orcid.org/0000-0002-6188-6859 href=https://orcid.org/0000-0002-6188-6859 rel="noreferrer noopener me" target=_blank title=ORCID>ORCID</a></div></li><li><div itemscope itemtype=https://schema.org/Person><a itemprop=sameAs content="https://scholar.google.com/citations?user=4dTcK4kAAAAJ&hl=en" href="https://scholar.google.com/citations?user=4dTcK4kAAAAJ&hl=en" rel="noreferrer noopener me" target=_blank title="Google Scholar">Google Scholar</a></div></li></ul><p>© 2024 <a href=/ >Gijs van Dam</a>. Published with <a href=https://github.com/neumannjs/Janos>Janos</a>. Theme <a href=https://github.com/neumannjs/Miksa>Miksa</a>.</p></footer></body><script data-goatcounter=https://gijsvandam.goatcounter.com/count async src=//gc.zgo.at/count.js></script></html>