Unified Channel Message Payload and Private Message Payload
[crypto.git] / lib / silccore / silcauth.h
index be30c1a6a03ab2a3426e7290c363992dcb19cde2..6f874d959873f13ea2e394bb23cb9123e595a8eb 100644 (file)
  * used by client to agree on key material usually with another client
  * in the network.
  *
- * This interface defines also the SILC_MESSAGE_FLAG_SIGNED Payload,
- * which defines how channel messages and private messages can be digitally
- * signed.  This interface provides the payload parsing, encoding, 
- * signature computing and signature verification routines.
- *
  ***/
 
 #ifndef SILCAUTH_H
@@ -385,126 +380,4 @@ char *silc_key_agreement_get_hostname(SilcKeyAgreementPayload payload);
  ***/
 SilcUInt32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
 
-/****s* silccore/SilcAuthAPI/SilcSignedPayload
- *
- * NAME
- * 
- *    typedef struct SilcSignedPayloadStruct *SilcSignedPayload;
- *
- *
- * DESCRIPTION
- *
- *    This context represents the SILC_MESSAGE_FLAG_SIGNED Payload which
- *    is used with channel messages and private messages to indicate that
- *    the message is digitally signed.  This payload may include the
- *    message sender's public key and it includes the digital signature.
- *    This payload MUST NOT be used in any other context except with
- *    channel and private message sending and reception.
- *
- ***/
-typedef struct SilcSignedPayloadStruct *SilcSignedPayload;
-
-/****f* silccore/SilcAuthAPI/silc_signed_payload_parse
- *
- * SYNOPSIS
- *
- *    SilcSignedPayload silc_signed_payload_parse(const unsigned char *data,
- *                                                SilcUInt32 data_len);
- *
- * DESCRIPTION
- *
- *    Parses the SILC_MESSAGE_FLAG_SIGNED Payload from the `data' of
- *    length of `data_len' bytes.  The `data' must be payload without
- *    the actual message payload.  Returns the parsed payload or NULL
- *    on error.  Caller must free the returned payload.
- *
- ***/
-SilcSignedPayload silc_signed_payload_parse(const unsigned char *data,
-                                           SilcUInt32 data_len);
-
-/****f* silccore/SilcAuthAPI/silc_signed_payload_encode
- *
- * SYNOPSIS
- *
- *    SilcBuffer
- *    silc_signed_payload_encode(const unsigned char *message_payload,
- *                               SilcUInt32 message_payload_len,
- *                               SilcPublicKey public_key,
- *                               SilcPrivateKey private_key,
- *                               bool include_public_key);
- *
- * DESCRIPTION
- *
- *    Encodes the SILC_MESSAGE_FLAG_SIGNED Payload and computes the
- *    digital signature.  The `message_payload' is the message data that
- *    is used in the signature computation.  The encoding of the buffer
- *    is specified in the SILC protocol.  If `include_public_key' is
- *    TRUE then the public key included in the payload.  The `private_key'
- *    is used to produce the signature.  This function returns the encoded
- *    payload with the signature or NULL on error.  Caller must free the
- *    returned buffer.
- *
- ***/
-SilcBuffer silc_signed_payload_encode(const unsigned char *message_payload,
-                                     SilcUInt32 message_payload_len,
-                                     SilcPublicKey public_key,
-                                     SilcPrivateKey private_key,
-                                     SilcHash hash,
-                                     bool include_public_key);
-
-/****f* silccore/SilcAuthAPI/silc_signed_payload_free
- *
- * SYNOPSIS
- *
- *    void silc_signed_payload_free(SilcSignedPayload sig);
- *
- * DESCRIPTION
- *
- *    Frees the SILC_MESSAGE_FLAG_SIGNED Payload.
- *
- ***/
-void silc_signed_payload_free(SilcSignedPayload sig);
-
-/****f* silccore/SilcAuthAPI/silc_signed_payload_verify
- *
- * SYNOPSIS
- *
- *    int silc_signed_payload_verify(SilcSignedPayload sig,
- *                                   bool channel_message,
- *                                   void *message_payload,
- *                                   SilcPublicKey remote_public_key,
- *                                   SilcHash hash);
- *
- * DESCRIPTION
- *
- *    This routine can be used to verify the signature found in
- *    SILC_MESSAGE_FLAG_SIGNED Payload.  The `remote_public_key' is the
- *    sender's public key and is used in the verification.  If the
- *    `channel_message' is TRUE then `message_payload' must include the
- *    SilcChannelMessagePayload.  If it is FALSE then it must include
- *    SilcPrivateMessagePayload.  This returns SILC_AUTH_OK if the
- *    signature verification was successful.
- *
- ***/
-int silc_signed_payload_verify(SilcSignedPayload sig,
-                              bool channel_message,
-                              void *message_payload,
-                              SilcPublicKey remote_public_key,
-                              SilcHash hash);
-
-/****f* silccore/SilcAuthAPI/silc_signed_payload_get_public_key
- *
- * SYNOPSIS
- *
- *    SilcPublicKey silc_signed_payload_get_public_key(SilcSignedPayload sig);
- *
- * DESCRIPTION
- *
- *    Returns the public key from the SILC_MESSAGE_FLAG_SIGNED Payload
- *    or NULL if it does not include public key.  The caller must free
- *    the returned public key.
- *
- ***/
-SilcPublicKey silc_signed_payload_get_public_key(SilcSignedPayload sig);
-
 #endif