Hunt for DevOps Roles, Day 11 - Networking, Cryptography, and RESTCONF Basics

NETCONF/RESTCONF, AES/RSA/SHA-256, and UDP vs TCP

By Mark Truong

Basic networking, cryptography, and restconf basics

What Is RESTCONF?

Diagram of RESTCONF and JSON as protocol and data format flowing between a client machine and a network device

Reference video: https://www.youtube.com/watch?v=4VKlplZJBuk&t=348s

CLI to get to network device

NETCONF - remote procedure calls to network calls

XML messages

NETCONF Client -> NETCONF Server + Data Store

RESTCONF is something you typically build atop NETCONF

Ok, I have a general idea of how this works, essentially I want to be able to communicate with network devices through REST API CRUD operations through something like a GUI

What Is Cryptography?

https://www.youtube.com/watch?v=kb_scuDUHls

Cryptography is the art of hiding information, I like that definition

Same key to encrypt and decrypt data is AES encryption

Asymmetric encryption uses a public and private key, encrypt with public key, decrypt with private key.

You cannot get the input from the output in a sha256 hash

sha256 checksum compare to has of what you downloaded so you check your file hadn’t been tampered with

You can use software to check hash of what you downloaded with official checksum to see if you downloaded right file

Can store passwords securely

Symmetric Encryption / Decryption With AES

Diagram of symmetric encryption: plain text becomes cipher text through encryption, then back to plain text through decryption, both using the same private key

Key: password aes uses to encrypt / decrypt

IV: initialization vector, same size as key, starting part, for every encryption looks different even if the message and key are the same

Mode: how to handle messages longer than one block

Input:

Output

Asymmetric Encryption / Decryption With RSA

Diagram of asymmetric encryption: sender's plain text is encrypted with a public key into ciphered data, then decrypted with a private key back into plain text for the receiver

Public + Private Key

Algorithm includes large prime numbers, have RSA Key Generator

Encryption scheme: randomness / padding identical message has different cipher text

Message digest algorithm: hash function

What Is the Difference Between UDP and TCP?

Reference video: https://www.youtube.com/watch?v=uwoD5YsGACg

TCP requires a connection to send and receive data, and UDP doesn’t require a connection, UDP is essentially a way to send data and not care if the receiver has received all the data properly.

Diagram of the UDP Header showing 8 bytes made up of Source port, Destination port, Length, and Checksum, each 16 bits

Share: X (Twitter) Facebook