bbc1.core.key_exchange_manager module¶
Copyright (c) 2017 beyond-blockchain.org.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
class
bbc1.core.key_exchange_manager.
KeyExchangeManager
(networking, domain_id, counter_node_id)[source]¶ Bases:
object
ECDH (Elliptic Curve Diffie-Hellman) key exchange manager
-
KEY_EXCHANGE_INVOKE_MAX_BACKOFF
= 6¶
-
KEY_EXCHANGE_RETRY_INTERVAL
= 5¶
-
KEY_OBSOLETE_TIMER
= 10¶
-
KEY_REFRESH_INTERVAL
= 604800¶
-
STATE_CONFIRMING
= 2¶
-
STATE_ESTABLISHED
= 3¶
-
STATE_NONE
= 0¶
-
STATE_REQUESTING
= 1¶
-
receive_exchange_request
(pubkey, nonce, random_val, hint)[source]¶ Procedure when receiving message with BBcNetwork.REQUEST_KEY_EXCHANGE
Parameters: - pubkey (bytes) – public key
- nonce (bytes) – nonce value
- random_val (bytes) – random value in calculating key
-