Next Article in Journal
Acknowledgment to Reviewers of Cryptography in 2021
Previous Article in Journal
Designing a Practical Code-Based Signature Scheme from Zero-Knowledge Proofs with Trusted Setup
Previous Article in Special Issue
Generalized Concatenated Codes over Gaussian and Eisenstein Integers for Code-Based Cryptography
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Post-Quantum Two-Party Adaptor Signature Based on Coding Theory

Department of Electrical and Computer Engineering, University of Waterloo, Waterloo, ON N2L 3G1, Canada
*
Author to whom correspondence should be addressed.
Cryptography 2022, 6(1), 6; https://doi.org/10.3390/cryptography6010006
Submission received: 29 December 2021 / Revised: 22 January 2022 / Accepted: 25 January 2022 / Published: 27 January 2022
(This article belongs to the Special Issue Public-Key Cryptography in the Post-quantum Era)

Abstract

:
An adaptor signature can be viewed as a signature concealed with a secret value and, by design, any two of the trio yield the other. In a multiparty setting, an initial adaptor signature allows each party to create additional adaptor signatures without the original secret. Adaptor signatures help address scalability and interoperability issues in blockchain. They can also bring some important advantages to cryptocurrencies, such as low on-chain cost, improved transaction fungibility, and fewer limitations of a blockchain’s scripting language. In this paper, we propose a new two-party adaptor signature scheme that relies on quantum-safe hard problems in coding theory. The proposed scheme uses a hash-and-sign code-based signature scheme introduced by Debris-Alazard et al. and a code-based hard relation defined from the well-known syndrome decoding problem. To achieve all the basic properties of adaptor signatures formalized by Aumayr et al., we introduce further modifications to the aforementioned signature scheme. We also give a security analysis of our scheme and its application to the atomic swap. After providing a set of parameters for our scheme, we show that it has the smallest pre-signature size compared to existing post-quantum adaptor signatures.

1. Introduction

In cryptocurrencies and other blockchain applications, transactions are validated by miners, using decentralized consensus protocols. A transaction is akin to an application formed by scripts. The scripting language of a blockchain allows the encoding of potential functionalities and rules that make a transaction valid. Therefore, the fee for a transaction corresponds to the storage and computational cost of executing the transaction’s script by a miner. The fee sometimes can be excessively high for some cryptocurrencies with a scripting language that enables a more complex transaction logic. In addition to the high fee issue, the public verifiability feature of transactions and the permissionless nature of consensus protocols pose some other challenges with regard to scalability, privacy and transaction throughput.
The main approach to addressing the aforementioned issues is to reduce the size of on-chain transactions by handing off some transactions to off-chains. The goal is to use as few scripts as possible for on-chain transactions. Current promising solutions are payment channel networks (PCNs) [1,2,3,4,5,6,7]. They allow an off-chain payment between a sender and receiver through an intermediary. However, they do it by relying on the scripting-based functionality, which is available only with a few cryptocurrencies. To address this scripting issue, Poelstra [8] introduced a technique called scriptless script that enables us to create smart contracts without a script. The technique was later formalized as an adaptor signature by Fournier [9]. Recently, Aumayr et al. [10] have presented a full formalization of the adaptor signature as a cryptographic primitive.
An adaptor signature is a two-step signing algorithm bound to a secret. It is defined from a digital signature scheme and a hard relation. In the adaptor signature, the first pre-signature is generated by a user with knowledge of a witness of the hard relation.
The complete signature reveals the witness and can be verified by its corresponding verification algorithm. In blockchain applications, adaptor signatures bring some advantages to cryptocurrencies, such as a reduction in the on-chain cost and an improvement of each transaction’s fungibility.
Since the work by Poelstra, several articles on adaptor signature have appeared, e.g., [9,10,11,12,13,14,15,16,17]. In [10], the authors introduced two adaptor signature schemes based on Schnorr’s signature and the elliptic curve digital signature algorithm (ECDSA), respectively. Authors of [12] showed that signature schemes that are constructed from identification schemes with some additional homomorphic properties can be transformed into adaptor signature schemes. In [14], the authors showed how to provide an adaptor signature instance from any one-way homomorphic function. In [12] (respectively [17]), the authors designed a post-quantum adaptor signature based on lattices (respectively, isogenies).

1.1. Motivation

The adaptor signature is one of the central primitives in today’s cryptocurrency-based payment ecosystem. A few exceptions aside, most of the existing adaptor signature schemes will, however, be broken with the arrival of sufficiently large quantum computers. Thus, it is important to explore various ways to design efficient adaptor signature schemes that are quantum safe. Code-based cryptography, which has been studied for many years, is considered resistant against quantum-computer attacks and is one of the finalists in the current post-quantum cryptography (PQC) standardization process undertaken by the National Institute of Standards and Technology (NIST). To our knowledge, no adaptor signature scheme based on coding theory exists in the literature. Therefore, even if key sizes are large in code-based cryptography, designing a code-based adaptor signature is of interest to ensure the post-quantum security of blockchain applications.

1.2. Our Contributions

In this paper, we present a post-quantum adaptor signature scheme using cryptographic assumptions rooted in coding theory. To design our scheme, we use a hash-and-sign code-based signature scheme, called Wave, which was introduced by Debris-Alazard et al. [18]. The hard relation used in our scheme is defined from the well-known NP-complete problem in coding theory. However, in order to achieve the pre-signature correctness and pre-signature adaptability for adaptor signatures, we introduce a few modifications to Wave. After designing our scheme, we show that it satisfies the pre-signature correctness and the pre-signature adaptability property of the adaptor. We present a security analysis of our scheme and compare the latter with existing post-quantum adaptor signature schemes. We also give an application of our scheme to the atomic swap.

1.3. Organization

The remainder of the paper is organized as follows. Section 2 provides some preliminaries on coding theory and adaptor signature. In Section 3, we present the design of our code-based adaptor signature scheme and its security analysis. In Section 4, we provide a set of parameters for our scheme and its comparison with other post-quantum adaptor signature schemes. In Section 5, we give the application of our scheme in an atomic swap. Finally, we conclude in Section 6.

2. Preliminaries

2.1. Coding Theory

Let F be the finite field F q with q = p m and p a prime number. A linear code C of length n and dimension k over F is a vector subspace of dimension k of F n . It can be specified by a full rank matrix G F k × n called the generator matrix. The rows of G span the code C . Specifically, a linear code can be defined by its generator matrix as follows:
C = m G s . t . m F k
A linear code can be also defined by the right kernel of matrix H called parity-check matrix of C :
C = x F n s . t . x H T = 0
The Hamming distance between two codewords is the number of positions (coordinates) where they differ. The minimal distance of a code is the minimal distance of all codewords.
The weight of a word/vector x F n denoted by w t x is the number of its non-zero positions. Then, the minimal weight of a code C is the minimal weight of all non-zero codewords. In the case of linear code C , its minimal distance is equal to the minimal weight of the code.
In this paper, the set of vectors of length n and weight ω is denoted by S q , n , ω = { x F n s . t . w t ( x ) = ω } . For two given integers a and b, where a < b < n , we denote the set of vectors of length n with w t ( x ) [ a , b ] by S q , n , [ a , b ] = { x F n s . t . a w t ( x ) b } .

2.2. Hard Problems in Coding Theory

In this subsection, we recall some NP-complete problems in coding theory.
Problem 1. (Binary Syndrome Decoding (SD) problem)
Input: A matrix H F 2 r × n , a vector s F 2 r , and an integer ω > 0 .
Output: A vector y F 2 n such that w t ( y ) ω and s = y H T .
The SD problem was proved to be NP-complete in 1978 by McEliece and Van Tilbord [19]. Some of its instances can be solved in polynomial time, depending on the input. In particular, when the parameter ω is in the interval r 2 , n r 2 , solving it becomes easy—first, determine a pseudo-inverse H 1 of the matrix H and then compute the product s H 1 to return a valid solution with a high probability. However, when the value of the parameter ω is not in r 2 , n r 2 , if a single solution exists, finding it is much harder. For non-binary finite field F q , the corresponding interval is given by ( q 1 ) r q , n r q [18]. We now give the following definition.
Definition 1.
Let n, k, and ω be non-zero integers. Let H F q r × n be a matrix, where r = n k . Let e S q , n , ω be an error vector such that s = e H T . We say that an instance of a syndrome decoding problem is ϵ-hard if for all probabilistic polynomial time (PPT) algorithm A with input ( H , s ) we have
Pr [ e A ( H , s ) ] ϵ
The syndrome decoding problem is equivalent to the following problem.
Problem 2 (General Decoding (GBD) problem).
Input: A matrix G F q k × n , a vector y F q n , and an integer ω > 0 .
Output: Two vectors m F q k and e F q n such that w t ( e ) = ω and y = m G + e .
Problem 3 (Generalized) code distinguishing problem).
Input: A matrix H F q r × n .
Output: Decide whether H is a parity-check matrix of a generalized ( U , U + V ) code.
Problem 3 is one of the problems on which the security assumption of our adaptor signature scheme relies. It is hard in the worst case; for more information about its hardness or NP-completeness, we refer the reader to [18,20].
The following problem is used in the security proof of the underlying signature scheme that we use in this paper. It was first considered by Johansson and Jonsson in [21] and was analyzed later by Sendrier in [22].
Problem 4 (Decoding One Out of Many (DOOM) problem).
Input: A matrix H F q r × n , a set of vectors s 1 , s 2 ,..., s N F q r and an integer ω.
Output: A vector e F q n and an integer i such that 1 i N , w t ( e ) = ω and s i = e H T .

2.3. Hard Relation

A hard relation is a relation R with a statement–witness pair such that the following hold:
There is a PPT algorithm Gen ( 1 ˘ ) with input of the security parameter λ and output of a statement–witness pair ( Y , x ) .
The relation R is in poly-time decidable.
For all PPT adversaries A , there is a negligible function ϵ such that
Pr ( Y , x * ) R ( Y , x ) Gen ( 1 λ ) x * = A ( Y ) ϵ ( λ )
The language associated to the relation R is the set denoted by L R and defined by
L R = { Y | x s . t . ( Y , x ) R }

2.4. Code-Based Signature Scheme

The first secure code-based signature is due to Courtois et al. (CFS) [23]. It uses two security assumptions: the indistinguishability of random binary linear codes and the hardness of the syndrome decoding problem. This scheme is not considered practical due to the difficulty of finding a random decodable syndrome. It was later modified by Dallot [24] and became to be known as the mCFS (modified Courtois–Finiasz–Sendrier) signature scheme. One of the security assumptions in mCFS is the indistinguishability of random Goppa binary codes. This led to the emergence of an attack [25]. Currently, the latest code-based signature scheme of this type is due to Debris-Alazard et al. [18]. Their scheme is called Wave and is based on generalized ( U , U + V ) codes over F q with q 3 . Wave is currently one of the most secure and efficient code-based signature schemes designed from a framework other than the Fiat–Shamir transformation. A description of Wave is given in Figure 1.

2.5. Adaptor Signature Scheme

In this subsection, we recall the formal definition of the adaptor signature followed by its basic security properties.
Definition 2
(Adaptor signature [10]). An adaptor signature R , Ξ defined with respect to hard relation R and a digital signature scheme Ξ = ( Gen , Sign , Verif ) is a tuple of four algorithms ( PreSign , PreVerif , Adapt , Ext ) , where the following hold:
PreSign ( sk , m , Y ) is a PPT algorithm that takes as input a secret key sk, a statement Y and a message m F 2 * , and outputs a pre-signature σ ˜ .
PreVerif ( pk , m , Y , σ ˜ ) is a DPT algorithm that takes as input a public key pk, a statement Y , and a pre-signature σ ˜ , and produces 0 or 1 as output.
Adapt ( σ ˜ , x ) is a DPT algorithm that takes as input a pre-signature σ ˜ and witness y and outputs a valid signature σ.
Ext ( Y , σ , σ ˜ ) is a DPT algorithm that on input a signature σ, pre-signature σ ˜ and statement Y L R , outputs a witness x such that ( Y , x ) R , or the symbol .
Note that adaptor signature schemes inherit the key generation, signature and verification algorithms of the underlying signature scheme and hence, acquire the correctness of the standard digital signature scheme. An adaptor signature scheme, however, has to verify some supplementary properties given by the following definitions.
Definition 3
(Pre-signature correctness [10]). An adaptor signature R , Ξ satisfies pre-correctness if for every λ N , every message m { 0 ; 1 } * and every statement/witness pair ( Y , x ) R , the following holds:
Pr PreVerif ( pk , m , Y , σ ˜ ) = 1 ( sk , pk ) Gen ( 1 λ ) Verif ( pk , m , σ ) = 1 σ ˜ PreSign ( s k , m , Y ) σ : = Adapt ( pk , x , σ ˜ ) ( Y , x ) R x : = Ext ( σ , σ ˜ , Y ) = 1
More precisely, the pre-signature correctness states that a valid pre-signature σ ˜ , which is honestly generated w.r.t. a statement Y L R H pk , could be adapted into a valid signature. From this signature, we can extract a witness x for the statement Y . The second basic required property for the adaptor signature is the pre-signature adaptability. This second one is stronger than the pre-signature correctness property. It is given by the following definition.
Definition 4
(Pre-signature adaptability). An adaptor signature R , Ξ satisfies pre-signature adaptability if for any λ N , any message m { 0 ; 1 } * , any statement/witness pair ( Y , x ) R , any key pair ( sk , pk ) Gen ( 1 λ ) and any pre-signature σ ˜ withPreVerif ( pk , m , Y , σ ˜ ) = 1 , we have
Pr Verif ( pk , m , Adapt ( pk , m , σ ˜ ) = 1
The pre-signature adaptability states that in reality, all valid pre-signature w.r.t. a statement Y L R can be adapted to a valid one, using a witness x such that ( Y , x ) R .
For an adaptor signature, there are two main required security properties: the unforgeability under chosen message attacks and witness extractability. These security properties are defined formally by Aumayr et al. [10]. Below, we recall the formal definition of the existential unforgeability under the chosen message attack for the adaptor signature (aEUF-CMA) and that of witness extractability.
Definition 5
(aEUF–CMA security [10]). An adaptor signature scheme R , Ξ is aEUF-CMA secure if for every PPT adversary A , there exists a negligible function ϵ such that
Pr aSigForge A , R , Ξ ( λ ) = 1 ϵ ( λ )
where aSigForge A , R , Ξ is the experiment given below in Figure 2.
The definition of the unforgeability in tthe adaptor signature is similar to that of existential unforgeability under chosen message attacks in the standard digital signature. However, in the case of the adaptor signature, there are some additional requirements: even given a pre-signature on m w.r.t. a random statement Y L R , producing a forgery σ has to be hard.
The witness extractability experiment and criteria for an adaptor signature are given by the following definitions.
Definition 6
(Witness extractability [10]). An adaptor signature scheme R , Ξ is witness extractability if for every PPT adversary A , there exists a negligible function ϵ such that
Pr aWitExt A , R , Ξ ( λ ) = 1 ϵ ( λ )
where aWitExt A , R , Ξ is the experiment in Figure 3.
The main difference between the witness extractability and the aEUF-CMA experiment is that in the first one, the adversary is allowed to choose a forgery statement Y . Assuming that the adversary knows a witness for Y , it can therefore generate a valid signature for the forgery message m . Then, it wins when the valid signature does not reveal a witness for Y .
The following is the definition of a secure adaptor signature.
Definition 7
(Secure adaptor signature). An adaptor signature R , Ξ is said to be secure, if it is aEUF-CMA secure, pre-signature adaptable and witness extractable.

3. Code-Based Adaptor Signature

3.1. Description of Our Scheme

In this section, we present our code-based adaptor signature scheme R H pk , W a v e . Its security relies on the hardness of the syndrome decoding problem.
Let C be a random q-ary linear code of length n, dimension k, with parity-check matrix H pk and error correction capability t. Let x S q , n , t and Y F q n k . Let the relation R H pk be defined by
R H pk = { ( Y , x ) s . t . Y = x H pk T a n d w t ( x ) = t }
We denote the language associated to the relation R H pk by L R H pk , which is defined by
L R H pk = { Y F q n k | x S q , n , t s . t . ( Y , x ) R H pk }
For signing a message m in Wave, the sender chooses a random vector r F 2 2 λ , computes s = H 0 ( m r ) and decodes s by using its secret key to find the error vector e of weight ω such that s = e H T . Therefore, the signature corresponding to the message m is given by the pair σ = ( e P , r ) .
In our scheme, we use the ternary finite field F 3 . We also use two different hash functions H 0 : { 0 ; 1 } * F 3 n k and H 1 : { 0 ; 1 } * S 3 , n , δ for a well-chosen value of the integer δ . In the PreSign algorithm of our adaptor signature, we first randomly choose r in F 2 2 λ . Then, for all given ( Y , Y ) R H pk , we compute s = H 0 ( m Y H 1 ( r ) H pk T ) F 3 n k instead of s = H 0 ( m r ) . The PreVerif algorithm of our scheme is similar to the verification algorithm Verif of Wave. Indeed, the receiver has to check that the following equality holds.
e H pk T = H 0 ( m Y H 1 ( r ) H pk T )
Compared to Wave, the signature of a message m in our scheme is a pair σ = ( e , r ) with e H pk T = H 0 ( m r H pk T ) and r F 2 n instead of e H pk T = H 0 ( m r ) and r F 2 2 λ .
The Adapt algorithm in our scheme takes as input a tuple ( ( e ˜ , r ˜ ) , x ) and output the pair ( e , r ) , where r = x H 1 ( r ˜ ) and e = e ˜ . To extract the witness corresponding to a statement Y , we execute the algorithm Ext which takes as input ( Y , σ ˜ , σ ) , where σ ˜ = ( e ˜ , r ˜ ) is a pre-signature and σ = ( e , r ) is the corresponding signature. The algorithm Ext outputs x = H 1 ( r ˜ ) + r if Y = x H pk T and w t ( x ) = ω . Otherwise, it returns the abort symbol. See Figure 4 for the description of our scheme.

3.2. Security Analysis

Before giving the security analysis of our scheme, let us verify the pre-signature correctness and the pre-signature adaptability of our scheme.
Proposition 1.
The code-based adaptor signature R H pk , W a v e described in Figure 4 satisfies the pre-signature adaptability.
Proof. 
Let pk : = ( S , H sk , P ) be an arbitrary secret key. Let m F 2 * be an arbitrary message. Let pk : = H pk be the corresponding public key of sk, where H pk : = S H pk P and H pk is the parity-check matrix of a ( U , U + V ) code. Let us consider ( Y , x ) R H pk . Let σ ˜ be a pre-signature generated w.r.t. Y . Then σ ˜ is the tuple ( e ˜ , r ˜ ) so if pk ( pk , m , Y , σ ˜ ) = 1 , we know that e ˜ is actually computed by the owner of the secret key sk.
According to the design of Adapt, we have ( e , r ) : = Adapt ( σ ˜ : = ( e ˜ , r ˜ ) , x ) where r : = x H 1 ( r ˜ ) . We can therefore verify that
H 0 ( m r H pk T ) = H 0 ( m ( x H 1 ( r ˜ ) ) H pk T = H 0 ( m x H pk T H 1 ( r ˜ ) H pk T ) = H 0 ( m Y H 1 ( r ˜ ) H pk T ) = e ˜ H pk T
Proposition 2.
The code-based adaptor signature R H pk , W a v e described in Figure 4 satisfies the pre-signature correctness.
Proof. 
Let pk : = ( S , H pk , P ) be a secret key. Let m F 2 * be an arbitrary message. Let pk = H pk be the corresponding public key linked to sk, where H pk : = S H pk P and H pk is the parity-check matrix of a ( U , U + V ) code with decoding algorithm D H 0 . Let us consider ( Y , x ) R H pk .
Using the public key pk (respectively, the secret key sk), we can compute the syndrome s : = H 0 ( m Y H 1 ( r ˜ ) H pk T ) (respectively the corresponding error vector e ˜ : = D H sk ( s ( U 1 ) T ) ). Therefore, the pre-signature of the message m is given by σ ˜ : = ( e ˜ , r ˜ ) , where e ˜ = e ˜ P . For the pre-verification, we have to check the following equality:
e ˜ H pk T = H 0 ( m Y H 1 ( r ˜ ) H pk T )
When e ˜ is honestly computed, equality (1) always holds and then PreVerif ( pk , m , Y , σ ˜ ) = 1 .
According to Figure 4, the output of the adaptor algorithm is given by σ = ( e , r ) = Adapt ( σ ˜ , x ) , where r = x H 1 ( r ˜ ) with ( Y , x ) R H pk and that of the extractor algorithm is given by H 1 ( r ˜ ) + r = x H 1 ( r ˜ ) + H 1 ( r ˜ ) = x with ( Y , x ) R H pk . The fact that e ˜ is honestly computed, we have
H 0 ( m r H pk T ) = H 0 ( m ( x H 1 ( r ˜ ) ) H pk T ) = H 0 ( m Y H 1 ( r ˜ ) H pk T ) = e ˜
Therefore, in our scheme, σ = ( e , r ) is a valid signature for the message m . □
For the security analysis of the scheme, below, we state the assumptions which the security of our scheme relies on:
Assumption A1.
The advantage of probabilistic polynomial time algorithm A to solve the syndrome decoding problem is negligible with respect to the length n and the dimension k of the code.
Assumption A2.
The advantage of probabilistic polynomial time algorithm A to solve the ( U , U + V ) code distinguishing problem is negligible with respect to the length n and dimension k of the code.
Assumption A3.
The advantage of probabilistic polynomial time algorithm A in solving the decoding out of many (DOOM) problem is negligible with respect to the length n and dimension k of the code.
Under Assumption 1, the relation R H pk defined in Section 3.1 is a hard relation and under Assumptions 1 and 2, the Wave signature is EUF-CMA secure [18]. Therefore, we have the following.
Theorem 1
(aEUF-CMA Security). Under Assumptions 1, 2 and 3, the code-based adaptor R H pk , W a v e defined in Figure 4 is aEUF-CMA secure.
Proof. 
Let A be an adversary against our scheme in the aEUF-CMA game. Let ϵ a C M A be the probability that a PPT adversary wins against our scheme in the aEUF-CMA game. The proof of Theorem 1 consists of coming up with a bound for the adversary advantage Adv ( A ) . Suppose that there is a PPT adversary A which attacks the aEUF-CMA security of our code-based adaptor signature. That means that A is able to forge a valid signature σ = ( e , r ) on a targeted message m * after receiving the pair pre-signature/statement ( σ ˜ , Y ) from the challenger. σ ˜ = ( e ˜ , r ˜ ) is a pre-signature w.r.t. Y of the target message m * sent to the challenger by A . Let σ = ( e , r ) be a valid signature obtained w.r.t. the witness x of the Y after executing the adaptor algorithm, i.e., r = x H 1 ( r ˜ ) . If σ is a valid signature, then we have either σ = σ or σ σ .
If σ = σ , which is equivalent to ( e , r ) = ( e , r ) , then A is able to find r S 3 , n , [ | δ t | , δ + t ] , such that r = r = x H 1 ( r ˜ ) for a given r ˜ and Y such that Y = x H pk T . The best way to find such a vector r is to solve the equation Y = x H pk T , i.e., to solve a hard instance of the syndrome decoding problem.
If σ σ , we have two cases:
e = e and r r : this case implies that
e H pk T = H 0 ( m * r H pk T ) = H 0 ( m * r H pk T ) = e H pk T
It means that either we have r H pk T = r H pk T or A is able to find a collision of the hash function H 0 . With the collision resistance of the hash function H 0 , the probability that this case happen is less than
1 3 n k + ν ( λ )
where 1 3 n k is the probability for having the equality r H pk T = r H pk T (see [18]).
e e and r r : this last case means that the adversary A is able to forge a valid signature using the modified version of Wave that we use in our scheme, which is EUF-CMA secure.
By putting it all together, we have
Adv ( A ) 1 3 n k + Adv S D + Adv W a v e + ν ( λ )
where Adv Wave is the advantage of an adversary against Wave in the EUF-CMA game, and Adv SD is that for solving the syndrome decoding problem. □
Theorem 2.
(Witness Extractability) Under Assumptions 2 and 3, the code-based adaptor R H pk , W a v e defined in Figure 4 is witness extractable.
Proof. 
Let σ ˜ = ( e ˜ , r ˜ ) be the pre-signature correctly computed w.r.t. a statement Y . Let σ = ( e , r ) be a valid signature. Let x = Ext ( Y , σ ˜ , σ ) be the witness extracted from σ ˜ and σ . According to the algorithm Ext in our scheme, we have w t ( x ) = t and Y = x H pk T . That means if Ext outputs x , we have ( Y , x ) R H pk with a high probability.
Let σ = ( e , r ) be a valid signature computed w.r.t. σ ˜ by the honest witness owner. The fact that in the witness extractability game, we should have ( Y , x ) R H pk , we have
( Y , x ) R H pk r r σ σ .
Therefore, the rest of the proof corresponds to the second part of the proof of Theorem 1. □

4. Parameter Set and Experimental Results

4.1. Parameter Values and Signature Sizes

Referring to Figure 4 and [26], we can see that the length of pre-signature is given by | σ ˜ | = k + 2 λ and that of the signature is given by | σ | = k + n . For numerical values of the pre-signature and signature for security Level 1 of NIST PQC standard, our scheme will need to use δ = 517 and t = 12 . Using other necessary parameters from [26], specifically, λ = 128 , q = 3 , n = 8492 , ω = 7980 , k U = 3558 , k V = 2047 and d = 81 , we obtain the exact sizes of the pre-signature and the signature as 1143 bytes and 2793 bytes, respectively.
Using the above-mentioned parameter values, we give in Table 1 a numerical comparison of the pre-signature and signature sizes of our scheme with those of [12,17]. In the table, we see that for these parameter values, our scheme has a shorter pre-signature size but a slightly larger signature size. Specifically, for the parameter values given above, the pre-signature size of the scheme described in Figure 4 is more than 2.8 × and 16× smaller than those in [12,17], respectively. On the other hand, the signature size of the proposed scheme is 1.5 × lager than that of [17] and 0.97 × smaller than that of [12].

4.2. Software Prototype

We implemented the proposed scheme in software using the C programming language. For this, we adapted the source code of Bamegas et al. [26] by including necessary add ons, such as our code for the adaptor and extractor algorithms, the generation of random vectors of a given weight and transformation of their signature scheme to our pre-signature algorithm. The timing results of the execution of the code are based on VitualBox Intel@ core i7-1065G7 [email protected] GHZ, LLVM 10.0.0 128 bits, with 4 GB RAM under Ubuntu 18.04.6 64-bits. The code is compiled with GCC 10.3. The source code corresponding to our scheme is available at https://github.com/klambel-hash/Code-based-Adaptor-Signature (accessed on 24 January 2022).
For the purpose of comparison, we also ran the code of the adaptor signature scheme of [17] available at https://github.com/etairi/Adaptor-CSI-FiSh (accessed on 24 January 2022) on the aforementioned platform. In Table 2, we report the timing results of our scheme as well as those of [17]. In the table, the parameters for [17] are given as ( S , t S , k ) , where S is the number of pubic key used, t S is the number of repetitions performed and k is the rate of the slow hash function (see [17] page 16, for more details). Except for key generation and signature, our scheme consistently requires less time than [17] for all other components, namely, pre-signature, pre-verification, adaption and extraction.

5. An Application of Code-Based Adaptor Signature

In this section, we provide an example blockchain application, namely atomic swap, utilizing our adaptor signature. For this, we assume that the underlying blockchain is using the Wave signature based on coding theory or a full domain hash signature based on coding theory.

5.1. Atomic Swap in a Nutshell

Atomic swap is a peer-to-peer protocol which allows two different users to exchange cryptocurrencies without a trusted party. Its main goal is to allow an exchange of cryptocurrencies from two different blockchains.
During the atomic swap process, users have full ownership and control of their respective private keys. When one of the participants aborts a transaction or does not correctly fulfill the atomic swap process, funds are automatically returned to their original owners. This is possible in an atomic swap because of the use of a particular contract called hash timelock contract (HTLC). The main feature of HTLC is to technically enable the implementation of time-bound transactions between two users or participants. Indeed, when a user receives a HTLC transaction, it has to submit a cryptographic proof within a specific time frame. Otherwise, the funds will be returned to the original sender.

5.2. Atomic Swaps Using Code-Based Adaptor Signature

Let ( sk i , pk i ) be the key pair of user u i for i = 1 , 2 . Below, we describe how atomic swap could be executed, using our code-based adaptor signature.
We start with user u 1 , who randomly generates ( Y , x ) R H pk . The user also generates transaction T x 1 to spend currency c for user u 2 .
User u 1 computes the pre-signature σ ˜ 1 = PreSign ( sk 1 , T x 1 , Y ) and then sends ( σ ˜ 1 , T x 1 , Y ) to user u 2 .
User u 2 checks σ ˜ 1 using the pre-verification algorithm PreVerif. If the verification is successful, it generates transaction T x 2 to spend currency c for user u 1 .
User u 2 computes a pre-signature σ ˜ 2 = PreSign ( sk 2 , T x 2 , Y ) and sends the tuple ( σ ˜ 2 , T x 2 , Y ) to user u 1 . Otherwise, it aborts the transaction.
After receiving ( σ ˜ 2 , Y , T x 2 ) , user u 1 computes the pre-verification algorithm on σ ˜ 2 . If the pre-verification fails, it aborts the transaction. When the pre-verification on σ ˜ 2 is successful, user u 1 runs the adaptor algorithm Adapt to compute the signature σ 2 = Adapt ( σ ˜ 2 , x ) , publishes σ 2 on the blockchain and sends it to user u 2 .
After receiving σ 2 , user u 2 computes the extractor algorithm Ext to extract the witness x = Ext ( Y , σ 2 , σ ˜ 2 ) . It then runs the adaptor algorithm Adapt to compute the signature σ 1 = Adapt ( σ ˜ 1 , x ) . To finish, u 2 publishes σ 1 on the blockchain.
The above procedure is depicted in Figure 5.

6. Conclusions

In this paper, we proposed an adaptor signature scheme based on hard problems in coding theory. We used the code-based signature scheme Wave as our underlying signature scheme. In order to equip our scheme with common features and security properties, we presented some modifications to the Wave signature. We showed that the proposed adaptor signature scheme is secure under the hardness of the SD and the indistinguishability of generalized ( U , U + V ) code problems, both of which are considered quantum safe. We also gave a set of parameters for adaptor signature uses and compared the proposed scheme with other post-quantum adaptor signature schemes in terms of pre-signature and signature sizes. For parameter values corresponding to Level 1 NIST PQC security, our scheme has a slightly larger signature size compared to that of [17], but a considerably smaller pre-signature size than those of [12,17]. With the smaller pre-signature size, our scheme has the potential to reduce the overall communication cost in an atomic swap, as there are more exchanges of pre-signatures than signatures.

Author Contributions

Writing—original draft preparation, J.B.K.; writing—review and editing, M.A.H.; funding acquisition, M.A.H. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Ripple Impact Fund/Silicon Valley Community Foundation (Grant 2018-188473).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Network-Fast, R. Cheap, Scalable Token Transfers for Ethereum. Available online: https://raiden.network/ (accessed on 21 January 2022).
  2. Green, M.; Miers, I. Bolt: Anonymous payment channels for decentralized currencies. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, Dallas, TX, USA, 30 October–3 November 2017; pp. 473–489. [Google Scholar]
  3. Malavolta, G.; Moreno-Sanchez, P.; Schneidewind, C.; Kate, A.; Maffei, M. Anonymous Multi-Hop Locks for Blockchain Scalability and Interoperability. Cryptology ePrint Archive. 2018. Available online: https://eprint.iacr.org/2018/472 (accessed on 24 January 2022).
  4. Roos, S.; Moreno-Sanchez, P.; Kate, A.; Goldberg, I. Settling payments fast and private: Efficient decentralized routing for path-based transactions. arXiv 2017, arXiv:1709.05748. [Google Scholar]
  5. Erdin, E.; Cebe, M.; Akkaya, K.; Solak, S.; Bulut, E.; Uluagac, S. A Bitcoin payment network with reduced transaction fees and confirmation times. Comput. Netw. 2020, 172, 107098. [Google Scholar] [CrossRef]
  6. Moreno-Sanchez, P.; Kate, A.; Maffei, M.; Pecina, K. Privacy preserving payments in credit networks. In Proceedings of the Network and Distributed Security Symposium, San Diego, CA, USA, 8–11 February 2015. [Google Scholar]
  7. Miller, A.; Bentov, I.; Kumaresan, R.; McCorry, P. Sprites: Payment Channels That Go Faster Than Lightning. CoRR, abs/1702.05812. 2017. Available online: https://allquantor.at/blockchainbib/pdf/miller2017sprites.pdf (accessed on 24 January 2022).
  8. Poelstra, A.; Scriptless Scripts. Presentation Slides. 2017. Available online: https://download.wpsoftware.net/bitcoin/wizardry/mw-slides/2017-05-milan-meetup/slides.pdf (accessed on 14 December 2021).
  9. Fournier, L. One-Time Verifiably Encrypted Signatures AKA Adaptor Signatures. 2019. Available online: https://raw.githubusercontent.com/LLFourn/one-time-VES/master/main.pdf (accessed on 28 December 2021).
  10. Aumayr, L.; Ersoy, O.; Erwig, A.; Faust, S.; Hostakova, K.; Maffei, M.; Moreno-Sanchez, P.; Riahi, S. Generalized Bitcoin-Compatible Channels. Tech. Rep. Cryptol. Eprint Arch. Rep. 2020, 2020, 476. [Google Scholar]
  11. Dryja, T. Discreet Log Contracts. 2017. Available online: https://dci.mit.edu/research/smart-contracts-discrete-log-contracts (accessed on 28 December 2021).
  12. Esgin, M.F.; Ersoy, O.; Erkin, Z. Post-quantum adaptor signatures and payment channel networks. In European Symposium on Research in Computer Security; Springer: Berlin/Heidelberg, Germany, 2020; pp. 378–397. [Google Scholar]
  13. Erwig, A.; Faust, S.; Hostáková, K.; Maitra, M.; Riahi, S. Two-Party Adaptor Signatures From Identification Schemes. In Public Key Cryptography (1); Springer: Berlin/Heidelberg, Germany, 2021; pp. 451–480. [Google Scholar]
  14. Malavolta, G.; Moreno-Sanchez, P.; Schneidewind, C.; Kate, A.; Maffei, M. Anonymous multi-hop locks for blockchain scalability and interoperability. In Proceedings of the 26th Annual Network and Distributed System Security Symposium, NDSS, San Diego, CA, USA, 24–27 February 2019. [Google Scholar]
  15. Moreno-Sanchez, P.; Blue, A.; Le, D.V.; Noether, S.; Goodell, B.; Kate, A. DLSAG: Non-interactive refund transactions for interoperable payment channels in monero. In International Conference on Financial Cryptography and Data Security; Springer: Berlin/Heidelberg, Germany, 2020; pp. 325–345. [Google Scholar]
  16. Tairi, E.; Moreno-Sanchez, P.; Maffei, M. A2L: Anonymous Atomic Locks for Scalability in Payment Channel Hubs. Tech. Rep. Cryptol. Eprint Arch. Rep. 2019, 2019, 589. [Google Scholar]
  17. Tairi, E.; Moreno-Sanchez, P.; Maffei, M. Post-Quantum Adaptor Signature for Privacy-Preserving Off-Chain Payments. Tech. Rep. Cryptol. Eprint Arch. Rep. 2020, 2020, 1345. [Google Scholar]
  18. Debris-Alazard, T.; Sendrier, N.; Tillich, J.P. Wave: A new code-based signature scheme. Tech. Rep. Cryptol. Eprint Arch. Rep. 2018, 2018, 996. [Google Scholar]
  19. Berlekamp, E.; McEliece, R.; Van Tilborg, H. On the inherent intractability of certain coding problems (corresp.). IEEE Trans. Inf. Theory 1978, 24, 384–386. [Google Scholar] [CrossRef]
  20. Debris-Alazard, T.; Sendrier, N.; Tillich, J.P. The problem with the SURF scheme. arXiv 2017, arXiv:1706.08065. [Google Scholar]
  21. Johansson, T.; Jonsson, F. On the complexity of some cryptographic problems based on the general decoding problem. IEEE Trans. Inf. Theory 2002, 48, 2669–2678. [Google Scholar] [CrossRef]
  22. Sendrier, N. Decoding one out of many. In International Workshop on Post-Quantum Cryptography; Springer: Berlin/Heidelberg, Germany, 2011; pp. 51–67. [Google Scholar]
  23. Courtois, N.T.; Finiasz, M.; Sendrier, N. How to achieve a McEliece-based digital signature scheme. In International Conference on the Theory and Application of Cryptology and Information Security; Springer: Berlin/Heidelberg, Germany, 2001; pp. 157–174. [Google Scholar]
  24. Dallot, L. Towards a concrete security proof of Courtois, Finiasz and Sendrier signature scheme. In Western European Workshop on Research in Cryptology; Springer: Berlin/Heidelberg, Germany, 2007; pp. 65–77. [Google Scholar]
  25. Faugere, J.C.; Gauthier-Umana, V.; Otmani, A.; Perret, L.; Tillich, J.P. A distinguisher for high-rate McEliece cryptosystems. IEEE Trans. Inf. Theory 2013, 59, 6830–6844. [Google Scholar] [CrossRef] [Green Version]
  26. Banegas, G.; Debris-Alazard, T.; Nedeljković, M.; Smith, B. Wavelet: Code-based postquantum signatures with fast verification on microcontrollers. arXiv 2021, arXiv:2110.13488. [Google Scholar]
Figure 1. Wave signature scheme [18].
Figure 1. Wave signature scheme [18].
Cryptography 06 00006 g001
Figure 2. aEUF-CMA game.
Figure 2. aEUF-CMA game.
Cryptography 06 00006 g002
Figure 3. Witness extractability game.
Figure 3. Witness extractability game.
Cryptography 06 00006 g003
Figure 4. Code-based adaptor signature.
Figure 4. Code-based adaptor signature.
Cryptography 06 00006 g004
Figure 5. Atomic swap using the proposed code-based adaptor signature.
Figure 5. Atomic swap using the proposed code-based adaptor signature.
Cryptography 06 00006 g005
Table 1. Comparison of pre-signature and signature sizes (in bytes).
Table 1. Comparison of pre-signature and signature sizes (in bytes).
Post-Quantum Adaptor SignaturePre-SignatureSignature
[17] 18327 | σ ˜ | 19944 263 | σ | 1880
[12] | σ ˜ | = 3210 | σ | = 3210
Our paper | σ ˜ | = 1143 | σ | = 2793
Table 2. Timings (in ms) for various component algorithms.
Table 2. Timings (in ms) for various component algorithms.
SchemeParametersKey GenerationPre-signaturePre-verificationSignVerifyAdaptExtract
[17]( 2 1 , 56 , 16 )151.2814,708.8614,780.203103.453031.595.075.09
( 2 2 , 38 , 14 )267.5913747.4713,612.152077.472002.634.864.95
( 2 3 , 28 , 16 )473.41212,746.8612,636.881552.051490.814.744.91
( 2 4 , 23 , 13 )929.4013,247.4713,217.231290.091237.944.764.87
( 2 6 , 16 , 16 )3411.3412267.4612,164.13924.91868.564.884.77
( 2 8 , 13 , 11 )13,169.9812,448.4012,310.03722.81679.164.734.64
( 2 10 , 11 , 7 )56,174.0313,861.6613,512.42717.34607.415.135.07
This paperSection 4.12552.532097.81348.952097.81348.950.130.11
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Klamti, J.B.; Hasan, M.A. Post-Quantum Two-Party Adaptor Signature Based on Coding Theory. Cryptography 2022, 6, 6. https://doi.org/10.3390/cryptography6010006

AMA Style

Klamti JB, Hasan MA. Post-Quantum Two-Party Adaptor Signature Based on Coding Theory. Cryptography. 2022; 6(1):6. https://doi.org/10.3390/cryptography6010006

Chicago/Turabian Style

Klamti, Jean Belo, and M. Anwar Hasan. 2022. "Post-Quantum Two-Party Adaptor Signature Based on Coding Theory" Cryptography 6, no. 1: 6. https://doi.org/10.3390/cryptography6010006

Article Metrics

Back to TopTop