Browse Source

Add blind-signatures-ec post

Add blind-signatures-ec post & update css style
master
arnaucube 3 years ago
parent
commit
278728c0e6
19 changed files with 518 additions and 76 deletions
  1. +17
    -3
      blogo-input/blogo.json
  2. BIN
      blogo-input/css/Roboto-Regular.ttf
  3. +21
    -6
      blogo-input/css/style.css
  4. BIN
      blogo-input/img/gradient-line.jpg
  5. BIN
      blogo-input/img/posts/blind-signatures-ec/flow0.png
  6. BIN
      blogo-input/img/posts/blind-signatures-ec/flow1.png
  7. +26
    -12
      blogo-input/index.html
  8. +107
    -0
      blogo-input/posts/blind-signatures-ec.md
  9. +4
    -0
      blogo-input/posts/blind-signatures-ec_thumb.md
  10. +207
    -0
      public/blind-signatures-ec.html
  11. +26
    -12
      public/blogo.html
  12. +26
    -12
      public/coffeeminer-hacking-wifi-cryptocurrency-miner.html
  13. BIN
      public/css/Roboto-Regular.ttf
  14. +21
    -6
      public/css/style.css
  15. +26
    -12
      public/flock-botnet.html
  16. BIN
      public/img/gradient-line.jpg
  17. BIN
      public/img/posts/blind-signatures-ec/flow0.png
  18. BIN
      public/img/posts/blind-signatures-ec/flow1.png
  19. +37
    -13
      public/index.html

+ 17
- 3
blogo-input/blogo.json

@ -1,21 +1,35 @@
{
"title": "ArnauCube - Blog",
"relativePath": "/blog",
"absoluteUrl": "https://arnaucube.com/blog",
"postsDir": "posts",
"indexTemplate": "index.html",
"postThumbTemplate": "postThumbTemplate.html",
"metadescr": "arnaucube blog",
"metaimg": "img/logoArnauCube.png",
"posts": [
{
"thumb": "blind-signatures-ec_thumb.md",
"md": "blind-signatures-ec.md",
"metaimg": "img/posts/blind-signatures-ec/flow1.png",
"metadescr": "In this notes, we will cover the scheme proposed at 'New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem' paper by Hamid Mala & Nafiseh Nezhadansari."
},
{
"thumb": "coffeeminer_thumb.md",
"md": "coffeeminer-hacking-wifi-cryptocurrency-miner.md"
"md": "coffeeminer-hacking-wifi-cryptocurrency-miner.md",
"metaimg": "img/posts/coffeeMiner/coffeeMiner-network-attack.png",
"metadescr": "The goal of this post, is to explain how can be done the attack of MITM (Machine-In-The-Middle) to inject some javascript in the html pages, to force all the machines connected to a WiFi network to be mining a cryptocurrency for the attacker."
},
{
"thumb": "flock-botnet_thumb.md",
"md": "flock-botnet.md"
"md": "flock-botnet.md",
"metaimg": "img/posts/flock-botnet/markovchain.png",
"metadescr": "Developing a twitter botnet with autonomous bots replying tweets with text generated based on probabilities in Markov chains"
},
{
"thumb": "blogo_thumb.md",
"md": "blogo.md"
"md": "blogo.md",
"metadescr": "How has this blog been made? In this post we will see how to develop a minimalistic static blog template engine with Go."
}
],
"copyRaw": [

BIN
blogo-input/css/Roboto-Regular.ttf


+ 21
- 6
blogo-input/css/style.css

@ -1,11 +1,26 @@
.o_gradient_background{
background-color: #222222;
background-image: url('../img/gradient-background-2560x1600.jpg');
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
@font-face {
font-family: 'Roboto', monospace;
url(Roboto-Regular.ttf) format('truetype');
}
body {
font-family: 'Roboto', sans-serif;
}
a {
text-decoration:none!important;
}
blockquote {
background: #f9f9f9;
border-left: 8px solid #ccc;
margin: 1.5em 10px;
padding: 0.5em 10px;
}
h1,h2, h3, h4, h5 {
border-bottom: 1px solid #cccccc;
padding-top: 20px;
}

BIN
blogo-input/img/gradient-line.jpg

Before After
Width: 2560  |  Height: 72  |  Size: 15 KiB

BIN
blogo-input/img/posts/blind-signatures-ec/flow0.png

Before After
Width: 662  |  Height: 333  |  Size: 25 KiB

BIN
blogo-input/img/posts/blind-signatures-ec/flow1.png

Before After
Width: 658  |  Height: 333  |  Size: 59 KiB

+ 26
- 12
blogo-input/index.html

@ -2,11 +2,24 @@
<html lang="en">
<head>
<meta name="description" content="Webpage description goes here" />
<meta name="description" content="[blogo-summary]" />
<meta charset="utf-8">
<title>[blogo-title]</title>
<meta name="title" content="[blogo-title]">
<meta name="description" content="[blogo-summary]">
<meta property="og:title" content="[blogo-title]" />
<meta property="og:description" content="[blogo-summary]" />
<meta property="og:url" content="[blogo-link]" />
<meta property="og:type" content="article" />
<meta property="og:image" content="[blogo-img]" />
<meta name="twitter:title" content="[blogo-title]">
<meta name="twitter:description" content="[blogo-summary]">
<meta name="twitter:image" content="[blogo-img]">
<meta name="twitter:card" content="summary_large_image">
<meta name="author" content="arnaucube">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
@ -22,19 +35,19 @@
<body>
<!-- o_gradient_background" -->
<!-- o_gradient_background" -->
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top"
style="height:50px;font-size:130%;">
style="height:50px;font-size:130%;">
<div class="container">
<a href="/blog" style="color:#000;">Blog index</a>
<a href="/" style="color:#000;float:right;">arnaucube.com</a>
</div>
<img style="height:5px; width:100%; margin-top:8px;" src="img/gradient-line.jpg" />
</nav>
<div class="o_gradient_background" style="height:5px;"></div>
<div class="container" style="margin-top:80px;max-width:800px;">
<div class="container" style="margin-top:40px;max-width:800px;">
[blogo-content]
</div>
@ -54,7 +67,7 @@
</div>
<div class="row" style="display:inline-block;">
Blog made with <a href="http://github.com/arnaucube/blogo/"
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
</div>
</div>
</footer>
@ -66,20 +79,21 @@
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js" integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
displayMode: false,
// customised options
// • auto-render specific keys, e.g.:
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
],
// • rendering keys, e.g.:
throwOnError : true
});
});
</script>
});
</script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body>

+ 107
- 0
blogo-input/posts/blind-signatures-ec.md

@ -0,0 +1,107 @@
# Notes on blind signatures over elliptic curves
*2021-07-30*
> **Warning**: I want to state clearly that I'm not a mathematician, I'm just an amateur on math studying in my free time, and this article is just an attempt to try to sort the notes that I took while reading about the blind signatures over elliptic curves.
#### Blind signatures
Few years ago I read about the RSA blind signatures scheme (thanks to [Juan Hernández](https://futur.upc.edu/JuanBautistaHernandezSerrano) who discovered it to me) and I was amazed on such thing being possible. You can read the step by step of the *RSA blind signatures* scheme in [this Wikipedia article](https://en.wikipedia.org/wiki/Blind_signature#Blind_RSA_signatures).
The main idea is that one party has a message and blinds it, then sends the blinded message to a signer. The signer generates a signature of that blinded message, who sends it to the initial party, who unblinds the signature, obtaining a valid signature for the original message, while the signer does not know what it is signing, but the signature can be verified for the original message for the signer's public key.
<div style="text-align:center; font-size:80%;">
<img style="padding:50px;max-width:100%;" src="img/posts/blind-signatures-ec/flow0.png" />
<i>Diagram showing the described steps.</i>
</div>
<br>
This has many applications, one of them could be to authenticate users in a 'traditional' way (by user&password, or by public key & signature) in the Certification Authority (CA), and once the user is authenticated, the user can create a new key pair (ephemeral key), for which public key gets blinded and sent to the CA. The CA performs a blind signature on it, and sends the result back to the user. Then, the user can unblind the signature, and as result has their public key signed by the CA, but the CA does not know which is the public key (but the CA knows that the user while being authenticated by their 'traditional' login, generated a new identity (key pair) and sent the public key blinded to the CA, who blindly signed it and returned the signature back to the user). Then the user has the ephemeral public key which is signed by the CA, and can use it to enter the system authenticating that they are an approved user without revealing which user they are.
As most of the current ongoing protocols are using *elliptic curve* cryptography instead of *RSA*, the mentioned *RSA blind signatures* scheme is not much plugable in the existing systems that use *elliptic curve* keys. That's why I got interested into reading and learning about schemes that provide blind signatures over *elliptic curve*.
#### The scheme
In this notes, we will cover the scheme proposed at *"[New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem](https://sci-hub.do/10.1109/ICCKE.2013.6682844)"* paper by Hamid Mala & Nafiseh Nezhadansari (thanks to [Daira Hopwood](https://twitter.com/feministPLT) who mentioned this paper in a Telegram group).
First of all, the *signer* generates their key pair by generating a random scalar $d \in \mathbb{Z}_n$ (where $\mathbb{Z}_n$ is the elliptic curve field), which will be the *private key*. From $d$ they can compute the *public key* by $Q = dG$, where $G$ is the generator point of $\mathbb{G}$ (the elliptic curve group).
Appart from their key pair, the *signer* will generate for each request of signature another random value $k \in \mathbb{Z}_n$, and its respective $R'=kG$.
The *user* has a message *m* that which they want to get signed by the *signer* (without the *signer* knowing the content of *m*). In order to achieve that, the user will generate a coupe of random values $a, b \in \mathbb{Z}_n$, and from these parameters will compute the *blinding factor* $R=aR' + bG = (ak + b)G$, and as $R$ is a point we can get $R = (x, y)$.
The user can *blind* the message by computing $m' = a^{-1} \cdot x \cdot h(m)$, where $h(m)$ is the hash of the message.
Then, the *user* sends the *blinded message* ($m'$) to the *signer*, who will perform the *blind signature* by computing $s' = d m' + k$, which is sent back to the *user*.
The *user* can unblind the signature by $s = a s' + b$, and the complete signature will be $(R, s)$.
And now, we are in a point where the signature can be verified by a third party for the *signer*'s public key by checking $sG == R + x h(m) Q$.
<div style="text-align:center; font-size:80%;">
<img style="padding:50px;max-width:100%;" src="img/posts/blind-signatures-ec/flow1.png" />
<i>The previous diagram but with the operations from each step.</i>
</div>
<br>
From the verification $sG == R + x h(m) Q$, we can unroll it and check that:
$$
\fbox{sG} = (a s' + b) G = (a (d m' + k) + b) G\newline
= (a d m' + ak + b) G = ((a d (a^{-1} x h(m))) + ak + b) G\newline
= (d x h(m) + ak + b) G\newline
= dG x h(m) + (ak + b)G = \fbox{R + x h(m) Q}
$$
#### Code
Here is an example of how this scheme on the [secp256k1](https://en.bitcoin.it/wiki/Secp256k1) curve could be used using the implementation from [go-blindsecp256k1](https://github.com/arnaucube/go-blindsecp256k1).
```go
import (
[...]
"github.com/arnaucube/go-blindsecp256k1"
)
func main() {
// signer: create new signer key pair
sk := blindsecp256k1.NewPrivateKey()
signerPubK := sk.Public()
// signer: when user requests new R parameter to blind a new msg,
// create new signerR (public) with its secret k
k, signerR := blindsecp256k1.NewRequestParameters()
// user: blinds the msg using signer's R
msg := new(big.Int).SetBytes([]byte("test"))
msgBlinded, userSecretData, err := blindsecp256k1.Blind(msg, signerR)
if err != nil {
panic(err)
}
// signer: signs the blinded message using its private key & secret k
sBlind, err := sk.BlindSign(msgBlinded, k)
if err != nil {
panic(err)
}
// user: unblinds the blinded signature
sig := blindsecp256k1.Unblind(sBlind, userSecretData)
// signature can be verified with signer PublicKey
verified := blindsecp256k1.Verify(msg, sig, signerPubK)
if !verified {
fmt.Println("verification failed")
} else {
fmt.Println("blind signature verified")
}
}
```
#### Conclusions
Blind signatures are an interesting concept, which can be used in some use cases specially on voting systems. As we've seen, the math background behind it's not quite complex compared for example to zkSNARKs, and it does not require [trusted setups](https://medium.com/qed-it/diving-into-the-snarks-setup-phase-b7660242a0d7). Although, for most of the cases zkSNARKs have more flexibility, and we could cover similar use cases by proving that the user knows some *private key* for which the corresponding *public key* is placed in a leaf of a *Merkle Tree* for a certain *Merkle Root* (but this would be out of scope for the current notes).
An implementation of this scheme in Go can be found in: https://github.com/arnaucube/go-blindsecp256k1 (and a compatible Typescript implementation [blindsecp256k1-js](https://github.com/arnaucube/blindsecp256k1-js)). A next iteration could be to abstract the curve & keys structures, to use the generic Go ones, so other curves and already existing keys could be used with the same code.
*Special thanks to [@dhole](https://github.com/dhole) for reviewing this text.*

+ 4
- 0
blogo-input/posts/blind-signatures-ec_thumb.md

@ -0,0 +1,4 @@
## Notes on blind signatures over elliptic curves
In this notes, we will cover the scheme proposed at *"New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem"* paper by Hamid Mala & Nafiseh Nezhadansari.
*2021-07-30*

+ 207
- 0
public/blind-signatures-ec.html

@ -0,0 +1,207 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="In this notes, we will cover the scheme proposed at 'New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem' paper by Hamid Mala & Nafiseh Nezhadansari." />
<meta charset="utf-8">
<title>Notes on blind signatures over elliptic curves - ArnauCube - Blog</title>
<meta name="title" content="Notes on blind signatures over elliptic curves - ArnauCube - Blog">
<meta name="description" content="In this notes, we will cover the scheme proposed at 'New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem' paper by Hamid Mala & Nafiseh Nezhadansari.">
<meta property="og:title" content="Notes on blind signatures over elliptic curves - ArnauCube - Blog" />
<meta property="og:description" content="In this notes, we will cover the scheme proposed at 'New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem' paper by Hamid Mala & Nafiseh Nezhadansari." />
<meta property="og:url" content="https://arnaucube.com/blog/blind-signatures-ec.html" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://arnaucube.com/blog/img/posts/blind-signatures-ec/flow1.png" />
<meta name="twitter:title" content="Notes on blind signatures over elliptic curves - ArnauCube - Blog">
<meta name="twitter:description" content="In this notes, we will cover the scheme proposed at 'New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem' paper by Hamid Mala & Nafiseh Nezhadansari.">
<meta name="twitter:image" content="https://arnaucube.com/blog/img/posts/blind-signatures-ec/flow1.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="author" content="arnaucube">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
<!-- highlightjs -->
<!-- <link rel="stylesheet" href="js/highlightjs/atom-one-dark.css"> -->
<link rel="stylesheet" href="js/highlightjs/gruvbox-dark.css">
<script src="js/highlightjs/highlight.pack.js"></script>
<!-- katex -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous">
</head>
<body>
<!-- o_gradient_background" -->
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top"
style="height:50px;font-size:130%;">
<div class="container">
<a href="/blog" style="color:#000;">Blog index</a>
<a href="/" style="color:#000;float:right;">arnaucube.com</a>
</div>
<img style="height:5px; width:100%; margin-top:8px;" src="img/gradient-line.jpg" />
</nav>
<div class="container" style="margin-top:40px;max-width:800px;">
<h1>Notes on blind signatures over elliptic curves</h1>
<p><em>2021-07-30</em></p>
<blockquote>
<p><strong>Warning</strong>: I want to state clearly that I&rsquo;m not a mathematician, I&rsquo;m just an amateur on math studying in my free time, and this article is just an attempt to try to sort the notes that I took while reading about the blind signatures over elliptic curves.</p>
</blockquote>
<h4>Blind signatures</h4>
<p>Few years ago I read about the RSA blind signatures scheme (thanks to <a href="https://futur.upc.edu/JuanBautistaHernandezSerrano">Juan Hernández</a> who discovered it to me) and I was amazed on such thing being possible. You can read the step by step of the <em>RSA blind signatures</em> scheme in <a href="https://en.wikipedia.org/wiki/Blind_signature#Blind_RSA_signatures">this Wikipedia article</a>.
The main idea is that one party has a message and blinds it, then sends the blinded message to a signer. The signer generates a signature of that blinded message, who sends it to the initial party, who unblinds the signature, obtaining a valid signature for the original message, while the signer does not know what it is signing, but the signature can be verified for the original message for the signer&rsquo;s public key.</p>
<p><div style="text-align:center; font-size:80%;">
<img style="padding:50px;max-width:100%;" src="img/posts/blind-signatures-ec/flow0.png" />
<i>Diagram showing the described steps.</i>
</div>
<br></p>
<p>This has many applications, one of them could be to authenticate users in a &lsquo;traditional&rsquo; way (by user&amp;password, or by public key &amp; signature) in the Certification Authority (CA), and once the user is authenticated, the user can create a new key pair (ephemeral key), for which public key gets blinded and sent to the CA. The CA performs a blind signature on it, and sends the result back to the user. Then, the user can unblind the signature, and as result has their public key signed by the CA, but the CA does not know which is the public key (but the CA knows that the user while being authenticated by their &lsquo;traditional&rsquo; login, generated a new identity (key pair) and sent the public key blinded to the CA, who blindly signed it and returned the signature back to the user). Then the user has the ephemeral public key which is signed by the CA, and can use it to enter the system authenticating that they are an approved user without revealing which user they are.</p>
<p>As most of the current ongoing protocols are using <em>elliptic curve</em> cryptography instead of <em>RSA</em>, the mentioned <em>RSA blind signatures</em> scheme is not much plugable in the existing systems that use <em>elliptic curve</em> keys. That&rsquo;s why I got interested into reading and learning about schemes that provide blind signatures over <em>elliptic curve</em>.</p>
<h4>The scheme</h4>
<p>In this notes, we will cover the scheme proposed at <em>&ldquo;<a href="https://sci-hub.do/10.1109/ICCKE.2013.6682844">New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem</a>&rdquo;</em> paper by Hamid Mala &amp; Nafiseh Nezhadansari (thanks to <a href="https://twitter.com/feministPLT">Daira Hopwood</a> who mentioned this paper in a Telegram group).</p>
<p>First of all, the <em>signer</em> generates their key pair by generating a random scalar $d \in \mathbb{Z}_n$ (where $\mathbb{Z}_n$ is the elliptic curve field), which will be the <em>private key</em>. From $d$ they can compute the <em>public key</em> by $Q = dG$, where $G$ is the generator point of $\mathbb{G}$ (the elliptic curve group).</p>
<p>Appart from their key pair, the <em>signer</em> will generate for each request of signature another random value $k \in \mathbb{Z}_n$, and its respective $R&rsquo;=kG$.</p>
<p>The <em>user</em> has a message <em>m</em> that which they want to get signed by the <em>signer</em> (without the <em>signer</em> knowing the content of <em>m</em>). In order to achieve that, the user will generate a coupe of random values $a, b \in \mathbb{Z}_n$, and from these parameters will compute the <em>blinding factor</em> $R=aR&rsquo; + bG = (ak + b)G$, and as $R$ is a point we can get $R = (x, y)$.
The user can <em>blind</em> the message by computing $m&rsquo; = a^{-1} \cdot x \cdot h(m)$, where $h(m)$ is the hash of the message.</p>
<p>Then, the <em>user</em> sends the <em>blinded message</em> ($m&rsquo;$) to the <em>signer</em>, who will perform the <em>blind signature</em> by computing $s&rsquo; = d m&rsquo; + k$, which is sent back to the <em>user</em>.</p>
<p>The <em>user</em> can unblind the signature by $s = a s&rsquo; + b$, and the complete signature will be $(R, s)$.</p>
<p>And now, we are in a point where the signature can be verified by a third party for the <em>signer</em>&rsquo;s public key by checking $sG == R + x h(m) Q$.</p>
<p><div style="text-align:center; font-size:80%;">
<img style="padding:50px;max-width:100%;" src="img/posts/blind-signatures-ec/flow1.png" />
<i>The previous diagram but with the operations from each step.</i>
</div>
<br></p>
<p>From the verification $sG == R + x h(m) Q$, we can unroll it and check that:</p>
<p>$$
\fbox{sG} = (a s&rsquo; + b) G = (a (d m&rsquo; + k) + b) G\newline
= (a d m&rsquo; + ak + b) G = ((a d (a^{-1} x h(m))) + ak + b) G\newline
= (d x h(m) + ak + b) G\newline
= dG x h(m) + (ak + b)G = \fbox{R + x h(m) Q}
$$</p>
<h4>Code</h4>
<p>Here is an example of how this scheme on the <a href="https://en.bitcoin.it/wiki/Secp256k1">secp256k1</a> curve could be used using the implementation from <a href="https://github.com/arnaucube/go-blindsecp256k1">go-blindsecp256k1</a>.</p>
<pre><code class="language-go">import (
[...]
&quot;github.com/arnaucube/go-blindsecp256k1&quot;
)
func main() {
// signer: create new signer key pair
sk := blindsecp256k1.NewPrivateKey()
signerPubK := sk.Public()
// signer: when user requests new R parameter to blind a new msg,
// create new signerR (public) with its secret k
k, signerR := blindsecp256k1.NewRequestParameters()
// user: blinds the msg using signer's R
msg := new(big.Int).SetBytes([]byte(&quot;test&quot;))
msgBlinded, userSecretData, err := blindsecp256k1.Blind(msg, signerR)
if err != nil {
panic(err)
}
// signer: signs the blinded message using its private key &amp; secret k
sBlind, err := sk.BlindSign(msgBlinded, k)
if err != nil {
panic(err)
}
// user: unblinds the blinded signature
sig := blindsecp256k1.Unblind(sBlind, userSecretData)
// signature can be verified with signer PublicKey
verified := blindsecp256k1.Verify(msg, sig, signerPubK)
if !verified {
fmt.Println(&quot;verification failed&quot;)
} else {
fmt.Println(&quot;blind signature verified&quot;)
}
}
</code></pre>
<h4>Conclusions</h4>
<p>Blind signatures are an interesting concept, which can be used in some use cases specially on voting systems. As we&rsquo;ve seen, the math background behind it&rsquo;s not quite complex compared for example to zkSNARKs, and it does not require <a href="https://medium.com/qed-it/diving-into-the-snarks-setup-phase-b7660242a0d7">trusted setups</a>. Although, for most of the cases zkSNARKs have more flexibility, and we could cover similar use cases by proving that the user knows some <em>private key</em> for which the corresponding <em>public key</em> is placed in a leaf of a <em>Merkle Tree</em> for a certain <em>Merkle Root</em> (but this would be out of scope for the current notes).</p>
<p>An implementation of this scheme in Go can be found in: <a href="https://github.com/arnaucube/go-blindsecp256k1">https://github.com/arnaucube/go-blindsecp256k1</a> (and a compatible Typescript implementation <a href="https://github.com/arnaucube/blindsecp256k1-js">blindsecp256k1-js</a>). A next iteration could be to abstract the curve &amp; keys structures, to use the generic Go ones, so other curves and already existing keys could be used with the same code.</p>
<p><em>Special thanks to <a href="https://github.com/dhole">@dhole</a> for reviewing this text.</em></p>
</div>
<footer style="text-align:center; margin-top:100px;margin-bottom:50px;">
<div class="container">
<div class="row">
<ul class="list-inline">
<li><a href="https://twitter.com/arnaucube"
style="color:gray;text-decoration:none;"
target="_blank">twitter.com/arnaucube</a>
</li>
<li><a href="https://github.com/arnaucube"
style="color:gray;text-decoration:none;"
target="_blank">github.com/arnaucube</a>
</li>
</ul>
</div>
<div class="row" style="display:inline-block;">
Blog made with <a href="http://github.com/arnaucube/blogo/"
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
</div>
</div>
</footer>
<script>
</script>
<script src="js/external-links.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js" integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
displayMode: false,
// customised options
// • auto-render specific keys, e.g.:
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
],
// • rendering keys, e.g.:
throwOnError : true
});
});
</script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body>
</html>

+ 26
- 12
public/blogo.html

@ -2,11 +2,24 @@
<html lang="en">
<head>
<meta name="description" content="Webpage description goes here" />
<meta name="description" content="How has this blog been made? In this post we will see how to develop a minimalistic static blog template engine with Go." />
<meta charset="utf-8">
<title>Static blog template engine implementation in Go - ArnauCube - Blog</title>
<meta name="title" content="Static blog template engine implementation in Go - ArnauCube - Blog">
<meta name="description" content="How has this blog been made? In this post we will see how to develop a minimalistic static blog template engine with Go.">
<meta property="og:title" content="Static blog template engine implementation in Go - ArnauCube - Blog" />
<meta property="og:description" content="How has this blog been made? In this post we will see how to develop a minimalistic static blog template engine with Go." />
<meta property="og:url" content="https://arnaucube.com/blog/blogo.html" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://arnaucube.com/blog/" />
<meta name="twitter:title" content="Static blog template engine implementation in Go - ArnauCube - Blog">
<meta name="twitter:description" content="How has this blog been made? In this post we will see how to develop a minimalistic static blog template engine with Go.">
<meta name="twitter:image" content="https://arnaucube.com/blog/">
<meta name="twitter:card" content="summary_large_image">
<meta name="author" content="arnaucube">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
@ -22,19 +35,19 @@
<body>
<!-- o_gradient_background" -->
<!-- o_gradient_background" -->
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top"
style="height:50px;font-size:130%;">
style="height:50px;font-size:130%;">
<div class="container">
<a href="/blog" style="color:#000;">Blog index</a>
<a href="/" style="color:#000;float:right;">arnaucube.com</a>
</div>
<img style="height:5px; width:100%; margin-top:8px;" src="img/gradient-line.jpg" />
</nav>
<div class="o_gradient_background" style="height:5px;"></div>
<div class="container" style="margin-top:80px;max-width:800px;">
<div class="container" style="margin-top:40px;max-width:800px;">
<h1>Static blog template engine implementation in Go</h1>
<p><em>2017-12-26</em></p>
@ -407,7 +420,7 @@ func putHTMLToTemplate(template string, m map[string]string) string {
</div>
<div class="row" style="display:inline-block;">
Blog made with <a href="http://github.com/arnaucube/blogo/"
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
</div>
</div>
</footer>
@ -419,20 +432,21 @@ func putHTMLToTemplate(template string, m map[string]string) string {
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js" integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
displayMode: false,
// customised options
// • auto-render specific keys, e.g.:
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
],
// • rendering keys, e.g.:
throwOnError : true
});
});
</script>
});
</script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body>

+ 26
- 12
public/coffeeminer-hacking-wifi-cryptocurrency-miner.html

@ -2,11 +2,24 @@
<html lang="en">
<head>
<meta name="description" content="Webpage description goes here" />
<meta name="description" content="The goal of this post, is to explain how can be done the attack of MITM (Machine-In-The-Middle) to inject some javascript in the html pages, to force all the machines connected to a WiFi network to be mining a cryptocurrency for the attacker." />
<meta charset="utf-8">
<title>CoffeeMiner: Hacking WiFi to inject cryptocurrency miner to HTML requests - ArnauCube - Blog</title>
<meta name="title" content="CoffeeMiner: Hacking WiFi to inject cryptocurrency miner to HTML requests - ArnauCube - Blog">
<meta name="description" content="The goal of this post, is to explain how can be done the attack of MITM (Machine-In-The-Middle) to inject some javascript in the html pages, to force all the machines connected to a WiFi network to be mining a cryptocurrency for the attacker.">
<meta property="og:title" content="CoffeeMiner: Hacking WiFi to inject cryptocurrency miner to HTML requests - ArnauCube - Blog" />
<meta property="og:description" content="The goal of this post, is to explain how can be done the attack of MITM (Machine-In-The-Middle) to inject some javascript in the html pages, to force all the machines connected to a WiFi network to be mining a cryptocurrency for the attacker." />
<meta property="og:url" content="https://arnaucube.com/blog/coffeeminer-hacking-wifi-cryptocurrency-miner.html" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://arnaucube.com/blog/img/posts/coffeeMiner/coffeeMiner-network-attack.png" />
<meta name="twitter:title" content="CoffeeMiner: Hacking WiFi to inject cryptocurrency miner to HTML requests - ArnauCube - Blog">
<meta name="twitter:description" content="The goal of this post, is to explain how can be done the attack of MITM (Machine-In-The-Middle) to inject some javascript in the html pages, to force all the machines connected to a WiFi network to be mining a cryptocurrency for the attacker.">
<meta name="twitter:image" content="https://arnaucube.com/blog/img/posts/coffeeMiner/coffeeMiner-network-attack.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="author" content="arnaucube">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
@ -22,19 +35,19 @@
<body>
<!-- o_gradient_background" -->
<!-- o_gradient_background" -->
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top"
style="height:50px;font-size:130%;">
style="height:50px;font-size:130%;">
<div class="container">
<a href="/blog" style="color:#000;">Blog index</a>
<a href="/" style="color:#000;float:right;">arnaucube.com</a>
</div>
<img style="height:5px; width:100%; margin-top:8px;" src="img/gradient-line.jpg" />
</nav>
<div class="o_gradient_background" style="height:5px;"></div>
<div class="container" style="margin-top:80px;max-width:800px;">
<div class="container" style="margin-top:40px;max-width:800px;">
<h1>CoffeeMiner: Hacking WiFi to inject cryptocurrency miner to HTML requests</h1>
<p><em>2018-01-04</em></p>
@ -546,7 +559,7 @@ def start():
</div>
<div class="row" style="display:inline-block;">
Blog made with <a href="http://github.com/arnaucube/blogo/"
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
</div>
</div>
</footer>
@ -558,20 +571,21 @@ def start():
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js" integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
displayMode: false,
// customised options
// • auto-render specific keys, e.g.:
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
],
// • rendering keys, e.g.:
throwOnError : true
});
});
</script>
});
</script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body>

BIN
public/css/Roboto-Regular.ttf


+ 21
- 6
public/css/style.css

@ -1,11 +1,26 @@
.o_gradient_background{
background-color: #222222;
background-image: url('../img/gradient-background-2560x1600.jpg');
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
@font-face {
font-family: 'Roboto', monospace;
url(Roboto-Regular.ttf) format('truetype');
}
body {
font-family: 'Roboto', sans-serif;
}
a {
text-decoration:none!important;
}
blockquote {
background: #f9f9f9;
border-left: 8px solid #ccc;
margin: 1.5em 10px;
padding: 0.5em 10px;
}
h1,h2, h3, h4, h5 {
border-bottom: 1px solid #cccccc;
padding-top: 20px;
}

+ 26
- 12
public/flock-botnet.html

@ -2,11 +2,24 @@
<html lang="en">
<head>
<meta name="description" content="Webpage description goes here" />
<meta name="description" content="Developing a twitter botnet with autonomous bots replying tweets with text generated based on probabilities in Markov chains" />
<meta charset="utf-8">
<title>Auto generated tweets from Markov chains - ArnauCube - Blog</title>
<meta name="title" content="Auto generated tweets from Markov chains - ArnauCube - Blog">
<meta name="description" content="Developing a twitter botnet with autonomous bots replying tweets with text generated based on probabilities in Markov chains">
<meta property="og:title" content="Auto generated tweets from Markov chains - ArnauCube - Blog" />
<meta property="og:description" content="Developing a twitter botnet with autonomous bots replying tweets with text generated based on probabilities in Markov chains" />
<meta property="og:url" content="https://arnaucube.com/blog/flock-botnet.html" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://arnaucube.com/blog/img/posts/flock-botnet/markovchain.png" />
<meta name="twitter:title" content="Auto generated tweets from Markov chains - ArnauCube - Blog">
<meta name="twitter:description" content="Developing a twitter botnet with autonomous bots replying tweets with text generated based on probabilities in Markov chains">
<meta name="twitter:image" content="https://arnaucube.com/blog/img/posts/flock-botnet/markovchain.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="author" content="arnaucube">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
@ -22,19 +35,19 @@
<body>
<!-- o_gradient_background" -->
<!-- o_gradient_background" -->
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top"
style="height:50px;font-size:130%;">
style="height:50px;font-size:130%;">
<div class="container">
<a href="/blog" style="color:#000;">Blog index</a>
<a href="/" style="color:#000;float:right;">arnaucube.com</a>
</div>
<img style="height:5px; width:100%; margin-top:8px;" src="img/gradient-line.jpg" />
</nav>
<div class="o_gradient_background" style="height:5px;"></div>
<div class="container" style="margin-top:80px;max-width:800px;">
<div class="container" style="margin-top:40px;max-width:800px;">
<h1>Auto generated tweets from Markov chains</h1>
<p><em>2017-12-29</em></p>
@ -332,7 +345,7 @@
</div>
<div class="row" style="display:inline-block;">
Blog made with <a href="http://github.com/arnaucube/blogo/"
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
</div>
</div>
</footer>
@ -344,20 +357,21 @@
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js" integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
displayMode: false,
// customised options
// • auto-render specific keys, e.g.:
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
],
// • rendering keys, e.g.:
throwOnError : true
});
});
</script>
});
</script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body>

BIN
public/img/gradient-line.jpg

Before After
Width: 2560  |  Height: 72  |  Size: 15 KiB

BIN
public/img/posts/blind-signatures-ec/flow0.png

Before After
Width: 662  |  Height: 333  |  Size: 25 KiB

BIN
public/img/posts/blind-signatures-ec/flow1.png

Before After
Width: 658  |  Height: 333  |  Size: 59 KiB

+ 37
- 13
public/index.html

@ -2,11 +2,24 @@
<html lang="en">
<head>
<meta name="description" content="Webpage description goes here" />
<meta name="description" content="arnaucube blog" />
<meta charset="utf-8">
<title>ArnauCube - Blog</title>
<meta name="title" content="ArnauCube - Blog">
<meta name="description" content="arnaucube blog">
<meta property="og:title" content="ArnauCube - Blog" />
<meta property="og:description" content="arnaucube blog" />
<meta property="og:url" content="https://arnaucube.com/blog" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://arnaucube.com/blog/img/logoArnauCube.png" />
<meta name="twitter:title" content="ArnauCube - Blog">
<meta name="twitter:description" content="arnaucube blog">
<meta name="twitter:image" content="https://arnaucube.com/blog/img/logoArnauCube.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="author" content="arnaucube">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
@ -22,20 +35,30 @@
<body>
<!-- o_gradient_background" -->
<!-- o_gradient_background" -->
<nav id="mainNav" class="navbar navbar-default navbar-fixed-top"
style="height:50px;font-size:130%;">
style="height:50px;font-size:130%;">
<div class="container">
<a href="/blog" style="color:#000;">Blog index</a>
<a href="/" style="color:#000;float:right;">arnaucube.com</a>
</div>
<img style="height:5px; width:100%; margin-top:8px;" src="img/gradient-line.jpg" />
</nav>
<div class="o_gradient_background" style="height:5px;"></div>
<div class="container" style="margin-top:80px;max-width:800px;">
<a href='/blog/coffeeminer-hacking-wifi-cryptocurrency-miner.html'><div class="row" style="color:#000000;text-decoration:none;">
<div class="container" style="margin-top:40px;max-width:800px;">
<a href='/blog/blind-signatures-ec.html'><div class="row" style="color:#000000;text-decoration:none;">
<h2>Notes on blind signatures over elliptic curves</h2>
<p>In this notes, we will cover the scheme proposed at <em>&ldquo;New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem&rdquo;</em> paper by Hamid Mala &amp; Nafiseh Nezhadansari.</p>
<p><em>2021-07-30</em></p>
<hr>
</div>
</a><a href='/blog/coffeeminer-hacking-wifi-cryptocurrency-miner.html'><div class="row" style="color:#000000;text-decoration:none;">
<h2>CoffeeMiner: Hacking WiFi to inject cryptocurrency miner to HTML requests</h2>
<p>The goal of this post, is to explain how can be done the attack of MITM (Machine-In-The-Middle) to inject some javascript in the html pages, to force all the machines connected to a WiFi network to be mining a cryptocurrency for the attacker.</p>
@ -84,7 +107,7 @@
</div>
<div class="row" style="display:inline-block;">
Blog made with <a href="http://github.com/arnaucube/blogo/"
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
target="_blank" style="color: gray;text-decoration:none;">Blogo</a>
</div>
</div>
</footer>
@ -96,20 +119,21 @@
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js" integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
displayMode: false,
// customised options
// • auto-render specific keys, e.g.:
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
],
// • rendering keys, e.g.:
throwOnError : true
});
});
</script>
});
</script>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body>

Loading…
Cancel
Save