GNUnet  0.17.6
gnsrecord_crypto.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2009-2013, 2018 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
28 #include "platform.h"
29 #include "gnunet_util_lib.h"
30 #include "gnunet_constants.h"
31 #include "gnunet_signatures.h"
32 #include "gnunet_arm_service.h"
33 #include "gnunet_gnsrecord_lib.h"
34 #include "gnunet_dnsparser_lib.h"
35 #include "gnunet_tun_lib.h"
36 
40 struct GNRBlockPS
41 {
47 
52 
53  /* followed by encrypted data */
54 };
55 
56 
65 void
66 GNR_derive_block_aes_key (unsigned char *ctr,
67  unsigned char *key,
68  const char *label,
69  uint64_t exp,
70  const struct GNUNET_CRYPTO_EcdsaPublicKey *pub);
71 
72 
81 void
82 GNR_derive_block_xsalsa_key (unsigned char *nonce,
83  unsigned char *key,
84  const char *label,
85  uint64_t exp,
86  const struct GNUNET_CRYPTO_EddsaPublicKey *pub);
87 
void GNR_derive_block_xsalsa_key(unsigned char *nonce, unsigned char *key, const char *label, uint64_t exp, const struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Derive session key and iv from label and public key.
void GNR_derive_block_aes_key(unsigned char *ctr, unsigned char *key, const char *label, uint64_t exp, const struct GNUNET_CRYPTO_EcdsaPublicKey *pub)
Derive session key and iv from label and public key.
struct GNUNET_HashCode key
The key used in the DHT.
static struct GNUNET_CRYPTO_EddsaPublicKey pub
Definition: gnunet-scrypt.c:46
API for helper library to parse DNS packets.
API that can be used to manipulate GNS record data.
Standard TCP/IP network structs and IP checksum calculations for TUN interaction.
Information we have in an encrypted block with record data (i.e.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
Number of bytes signed; also specifies the number of bytes of encrypted data that follow.
struct GNUNET_TIME_AbsoluteNBO expiration_time
Expiration time of the block.
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
Public ECC key (always for curve Ed25519) encoded in a format suitable for network transmission and E...
Time for absolute time used by GNUnet, in microseconds and in network byte order.