commit 909b89c708c3086cb6552e4c986155a39cdb9b1e
parent 3cb152194494f989d381f4a3a1a32509d3fb20ad
Author: Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
Date: Tue, 4 Feb 2025 14:01:08 +0100
api-exchange: introduce explicit DenomCipher interface with cipher agility discriminator
Diffstat:
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
@@ -1671,19 +1671,26 @@ CSR-Withdraw
.. ts:def:: ExchangeWithdrawValue
- type ExchangeWithdrawValue =
+ type ExchangeWithdrawValue = DenomCipher & (
| ExchangeRsaWithdrawValue
- | ExchangeCsWithdrawValue;
+ | ExchangeCsWithdrawValue
+ );
+
+ .. ts:def:: DenomCipher
+
+ interface DenomCipher {
+ cipher: "RSA" | "CS";
+ }
.. ts:def:: ExchangeRsaWithdrawValue
- interface ExchangeRsaWithdrawValue {
+ interface ExchangeRsaWithdrawValue extends DenomCipher {
cipher: "RSA";
}
.. ts:def:: ExchangeCsWithdrawValue
- interface ExchangeCsWithdrawValue {
+ interface ExchangeCsWithdrawValue extends DenomCipher {
cipher: "CS";
// CSR R0 value
@@ -1852,13 +1859,14 @@ Withdraw
.. ts:def:: BlindedDenominationSignature
- type BlindedDenominationSignature =
+ type BlindedDenominationSignature = DenomCipher & (
| RsaBlindedDenominationSignature
- | CSBlindedDenominationSignature;
+ | CSBlindedDenominationSignature
+ )
.. ts:def:: RsaBlindedDenominationSignature
- interface RsaBlindedDenominationSignature {
+ interface RsaBlindedDenominationSignature extends DenomCipher {
cipher: "RSA";
// (blinded) RSA signature
@@ -1867,7 +1875,7 @@ Withdraw
.. ts:def:: CSBlindedDenominationSignature
- interface CSBlindedDenominationSignature {
+ interface CSBlindedDenominationSignature extends DenomCipher {
cipher: "CS";
// Signer chosen bit value, 0 or 1, used
@@ -3138,13 +3146,14 @@ proof to the seller for the escrow of sufficient fund.
.. ts:def:: DenominationSignature
- type DenominationSignature =
+ type DenominationSignature = DenomCipher & (
| RsaDenominationSignature
- | CSDenominationSignature;
+ | CSDenominationSignature
+ );
.. ts:def:: RsaDenominationSignature
- interface RsaDenominationSignature {
+ interface RsaDenominationSignature extends DenomCipher {
cipher: "RSA";
// RSA signature
@@ -3153,7 +3162,7 @@ proof to the seller for the escrow of sufficient fund.
.. ts:def:: CSDenominationSignature
- interface CSDenominationSignature {
+ interface CSDenominationSignature extends DenomCipher {
cipher: "CS";
// R value component of the signature.