summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-10-06 19:12:22 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-10-06 19:12:22 +0200
commitfa3ba808d4dfde387abcc33a50c894e3bbe59575 (patch)
treefbb663a365aa5b226d89710a926f258823bde364
parentd37a841d77652a0e9e5735bb492a6ef6204497ac (diff)
downloaddocs-fa3ba808d4dfde387abcc33a50c894e3bbe59575.tar.gz
docs-fa3ba808d4dfde387abcc33a50c894e3bbe59575.tar.bz2
docs-fa3ba808d4dfde387abcc33a50c894e3bbe59575.zip
defining typescript types where missing; incomplete
-rw-r--r--api-common.rst54
-rw-r--r--api-exchange.rst4
2 files changed, 43 insertions, 15 deletions
diff --git a/api-common.rst b/api-common.rst
index fd194203..c1d4cae9 100644
--- a/api-common.rst
+++ b/api-common.rst
@@ -156,26 +156,52 @@ Timestamps
Public Keys
^^^^^^^^^^^
-EdDSA and ECDHE public keys are always points on Curve25519 and represented
-using the standard 256 bits Ed25519 compact format, converted to Crockford
-Base32_.
+.. _`tsref-type-EddsaPublicKey`:
+.. _`tsref-type-EddsaPrivateKey`:
+
+.. code-block:: tsref
+
+ // EdDSA public keys are always points on Curve25519 (FIXME does that hold for private keys as well?) and represented
+ // using the standard 256 bits Ed25519 compact format, converted to Crockford
+ // `Base32`_.
+ type EddsaPublicKey = string;
+ type EddsaPrivateKey = string;
+
+.. _`tsref-type-RsaPublicKey`:
+
+.. code-block:: tsref
+
+ // RSA public key converted to Crockford `Base32`_.
+ type RsaPublicKey = string;
+
.. _signature:
Signatures
^^^^^^^^^^
-The specific signature scheme in use, like RSA blind signatures or EdDSA,
-depends on the context. RSA blind signatures are only used for coins and
-always simply base32_ encoded.
+.. _`tsref-type-EddsaSignature`:
+
+.. code-block:: tsref
+
+ // EdDSA signatures are transmitted as 64-byte `base32`_
+ // binary-encoded objects with just the R and S values (base32_ binary-only)
+ type EddsaSignature = string;
+
-EdDSA signatures are transmitted as 64-byte base32_ binary-encoded objects with
-just the R and S values (base32_ binary-only). These signed objects always
-contain a purpose number unique to the context in which the signature is used,
-but frequently the actual binary-object must be reconstructed locally from
-information available only in context, such as recent messages or account
-detals. These objects are described in detail in :ref:`Signatures`.
+.. _`tsref-type-RsaSignature`:
+.. code-block:: tsref
+
+ // `base32`_ encoded RSA signature
+ type RsaSignature = string;
+
+.. _`tsref-type-BlindedRsaSignature`:
+
+.. code-block:: tsref
+
+ // `base32`_ encoded RSA blinded signature
+ type BlindedRsaSignature = string;
.. _amount:
@@ -480,6 +506,10 @@ within the :ref:`exchange's codebase <exchange-repo>`.
struct GNUNET_HashCode hc;
};
+.. _TALER_DenominationKeyValidityPS:
+
+.. sourcecode:: c
+
struct TALER_DenominationKeyValidityPS {
/**
* purpose.purpose = TALER_SIGNATURE_MASTER_DENOMINATION_KEY_VALIDITY
diff --git a/api-exchange.rst b/api-exchange.rst
index d8f38f72..9edcaf75 100644
--- a/api-exchange.rst
+++ b/api-exchange.rst
@@ -124,9 +124,7 @@ possibly by using HTTPS.
// Fee charged by the exchange for refunding a coin of this denomination
fee_refund: Amount;
- // Signature with purpose
- // `TALER_SIGNATURE_MASTER_DENOMINATION_KEY_VALIDITY` over the expiration
- // dates, value and the key, created with the exchange's master key.
+ // Signature of `TALER_DenominationKeyValidityPS`_
master_sig: EddsaSignature;
}