SlideShare a Scribd company logo
1 of 26
Download to read offline
encrypt all transports
@feyeleanor
https
package main
import . "fmt"
import . "net/http"
const ADDRESS = ":443"
func main() {
message := "hello world"
HandleFunc("/hello", func(w ResponseWriter, r *Request) {
w.Header().Set("Content-Type", "text/plain")
Fprintf(w, message)
})
ListenAndServeTLS(ADDRESS, "cert.pem", "key.pem", nil)
}
go for the would-be network programmer http://slides.games-with-brains.net/3
package main
import . "fmt"
import . "net/http"
const ADDRESS = ":443"
func main() {
message := "hello world"
HandleFunc("/hello", func(w ResponseWriter, r *Request) {
w.Header().Set("Content-Type", "text/plain")
Fprintf(w, message)
})
ListenAndServeTLS(ADDRESS, "cert.pem", "key.pem", nil)
}
go for the would-be network programmer http://slides.games-with-brains.net/4
tcp/tls server
package main
import "crypto/rand"
import "crypto/tls"
import . "fmt"
func main() {
ListenTLS(":443", ConfigTLS("scert", "skey"), func(c *tls.Conn)
{
Fprintln(c, "hello world")
})
}
func ListenTLS(a string, conf *tls.Config, f func(*tls.Conn)) {
if listener, e := tls.Listen("tcp", a, conf); e == nil {
for {
if connection, e := listener.Accept(); e == nil {
go func(c *tls.Conn) {
defer c.Close()
f(c)
}(connection.(*tls.Conn))
}
}
}
}
func ConfigTLS(c, k string) (r *tls.Config) {
if cert, e := tls.LoadX509KeyPair(c, k); e == nil {
r = &tls.Config{
Certificates: []tls.Certificate{ cert },
Rand: rand.Reader,
}
}
return
}
go for the would-be network programmer http://slides.games-with-brains.net/6
package main
import "crypto/rand"
import "crypto/tls"
import . "fmt"
func main() {
ListenTLS(":443", ConfigTLS("scert", "skey"), func(c *tls.Conn)
{
Fprintln(c, "hello world")
})
}
func ListenTLS(a string, conf *tls.Config, f func(*tls.Conn)) {
if listener, e := tls.Listen("tcp", a, conf); e == nil {
for {
if connection, e := listener.Accept(); e == nil {
go func(c *tls.Conn) {
defer c.Close()
f(c)
}(connection.(*tls.Conn))
}
}
}
}
func ConfigTLS(c, k string) (r *tls.Config) {
if cert, e := tls.LoadX509KeyPair(c, k); e == nil {
r = &tls.Config{
Certificates: []tls.Certificate{ cert },
Rand: rand.Reader,
}
}
return
}
go for the would-be network programmer http://slides.games-with-brains.net/7
tcp/tls client
package main
import . "fmt"
import "bufio"
import "net"
import “crypto/tls"
func main() {
DialTLS(":1025", ConfigTLS("ccert", "ckey"), func(c net.Conn) {
if m, e := bufio.NewReader(c).ReadString('n'); e == nil {
Printf(m)
}
})
}
func ConfigTLS(c, k string) (r *tls.Config) {
if cert, e := tls.LoadX509KeyPair(c, k); e == nil {
r = &tls.Config{
Certificates: []tls.Certificate{ cert },
InsecureSkipVerify: false,
}
}
return
}
func DialTLS(a string, conf *tls.Config, f func(net.Conn)) {
if c, e := tls.Dial("tcp", a, conf); e == nil {
defer c.Close()
f(c)
}
}
go for the would-be network programmer http://slides.games-with-brains.net/9
package main
import . "fmt"
import "bufio"
import "net"
import “crypto/tls"
func main() {
DialTLS(":1025", ConfigTLS("ccert", "ckey"), func(c net.Conn) {
if m, e := bufio.NewReader(c).ReadString('n'); e == nil {
Printf(m)
}
})
}
func ConfigTLS(c, k string) (r *tls.Config) {
if cert, e := tls.LoadX509KeyPair(c, k); e == nil {
r = &tls.Config{
Certificates: []tls.Certificate{ cert },
InsecureSkipVerify: true,
}
}
return
}
func DialTLS(a string, conf *tls.Config, f func(net.Conn)) {
if c, e := tls.Dial("tcp", a, conf); e == nil {
defer c.Close()
f(c)
}
}
go for the would-be network programmer http://slides.games-with-brains.net/10
udp/aes server
package main
import "crypto/aes"
import "crypto/cipher"
import "crypto/rand"
import . "net"
const AES_KEY = "0123456789012345"
func main() {
Serve(":1025", func(c *UDPConn, a *UDPAddr, b []byte) {
if m, e := Encrypt("Hello World", AES_KEY); e == nil {
c.WriteToUDP(m, a)
}
})
}
func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := ListenUDP("udp", address); e == nil {
for b := make([]byte, 1024); ; b = make([]byte, 1024) {
if n, client, e := conn.ReadFromUDP(b); e == nil {
go f(conn, client, b[:n])
}
}
}
}
return
}
func Quantise(m string) (b []byte, e error) {
b = append(b, m...)
if p := len(b) % aes.BlockSize; p != 0 {
p = aes.BlockSize - p
// this is insecure and inflexible as we're padding with NUL
b = append(b, make([]byte, p)...)
}
return
}
func IV() (b []byte, e error) {
b = make([]byte, aes.BlockSize)
_, e = rand.Read(b)
return
}
func Encrypt(m, k string) (o []byte, e error) {
if o, e = Quantise([]byte(m)); e == nil {
var b cipher.Block
if b, e = aes.NewCipher([]byte(k)); e == nil {
var iv []byte
if iv, e = IV(); e == nil {
c := cipher.NewCBCEncrypter(b, iv)
c.CryptBlocks(o, o)
o = append(iv, o...)
}
}
}
return
}
go for the would-be network programmer http://slides.games-with-brains.net/12
package main
import "crypto/aes"
import "crypto/cipher"
import "crypto/rand"
import . "net"
const AES_KEY = "0123456789012345"
func main() {
Serve(":1025", func(c *UDPConn, a *UDPAddr, b []byte) {
if m, e := Encrypt("Hello World", AES_KEY); e == nil {
c.WriteToUDP(m, a)
}
})
}
func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := ListenUDP("udp", address); e == nil {
for b := make([]byte, 1024); ; b = make([]byte, 1024) {
if n, client, e := conn.ReadFromUDP(b); e == nil {
go f(conn, client, b[:n])
}
}
}
}
return
}
func Quantise(m string) (b []byte, e error) {
b = append(b, m...)
if p := len(b) % aes.BlockSize; p != 0 {
p = aes.BlockSize - p
// this is insecure and inflexible as we're padding with NUL
b = append(b, make([]byte, p)...)
}
return
}
func IV() (b []byte, e error) {
b = make([]byte, aes.BlockSize)
_, e = rand.Read(b)
return
}
func Encrypt(m, k string) (o []byte, e error) {
if o, e = Quantise([]byte(m)); e == nil {
var b cipher.Block
if b, e = aes.NewCipher([]byte(k)); e == nil {
var iv []byte
if iv, e = IV(); e == nil {
c := cipher.NewCBCEncrypter(b, iv)
c.CryptBlocks(o, o)
o = append(iv, o...)
}
}
}
return
}
go for the would-be network programmer http://slides.games-with-brains.net/13
package main
import "crypto/aes"
import "crypto/cipher"
import "crypto/rand"
import . "net"
const AES_KEY = "0123456789012345"
func main() {
Serve(":1025", func(c *UDPConn, a *UDPAddr, b []byte) {
if m, e := Encrypt("Hello World", AES_KEY); e == nil {
c.WriteToUDP(m, a)
}
})
}
func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := ListenUDP("udp", address); e == nil {
for b := make([]byte, 1024); ; b = make([]byte, 1024) {
if n, client, e := conn.ReadFromUDP(b); e == nil {
go f(conn, client, b[:n])
}
}
}
}
return
}
func Quantise(m string) (b []byte, e error) {
b = append(b, m...)
if p := len(b) % aes.BlockSize; p != 0 {
p = aes.BlockSize - p
// this is insecure and inflexible as we're padding with NUL
b = append(b, make([]byte, p)...)
}
return
}
func IV() (b []byte, e error) {
b = make([]byte, aes.BlockSize)
_, e = rand.Read(b)
return
}
func Encrypt(m, k string) (o []byte, e error) {
if o, e = Quantise([]byte(m)); e == nil {
var b cipher.Block
if b, e = aes.NewCipher([]byte(k)); e == nil {
var iv []byte
if iv, e = IV(); e == nil {
c := cipher.NewCBCEncrypter(b, iv)
c.CryptBlocks(o, o)
o = append(iv, o...)
}
}
}
return
}
go for the would-be network programmer http://slides.games-with-brains.net/14
package main
import "crypto/aes"
import "crypto/cipher"
import "crypto/rand"
import . "net"
const AES_KEY = "0123456789012345"
func main() {
Serve(":1025", func(c *UDPConn, a *UDPAddr, b []byte) {
if m, e := Encrypt("Hello World", AES_KEY); e == nil {
c.WriteToUDP(m, a)
}
})
}
func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := ListenUDP("udp", address); e == nil {
for b := make([]byte, 1024); ; b = make([]byte, 1024) {
if n, client, e := conn.ReadFromUDP(b); e == nil {
go f(conn, client, b[:n])
}
}
}
}
return
}
func Quantise(m string) (b []byte, e error) {
b = append(b, m...)
if p := len(b) % aes.BlockSize; p != 0 {
p = aes.BlockSize - p
// this is insecure and inflexible as we're padding with NUL
b = append(b, make([]byte, p)...)
}
return
}
func IV() (b []byte, e error) {
b = make([]byte, aes.BlockSize)
_, e = rand.Read(b)
return
}
func Encrypt(m, k string) (o []byte, e error) {
if o, e = Quantise([]byte(m)); e == nil {
var b cipher.Block
if b, e = aes.NewCipher([]byte(k)); e == nil {
var iv []byte
if iv, e = IV(); e == nil {
c := cipher.NewCBCEncrypter(b, iv)
c.CryptBlocks(o, o)
o = append(iv, o...)
}
}
}
return
}
go for the would-be network programmer http://slides.games-with-brains.net/15
udp/aes client
package main
import "bufio"
import "crypto/cipher"
import "crypto/aes"
import . "fmt"
import . "net"
const AES_KEY = "0123456789012345"
func main() {
Request(":1025", func(c *UDPConn) {
c.Write(make([]byte, 1))
if m, e := ReadStream(c); e == nil {
if m, e := Decrypt(m, AES_KEY); e == nil {
Println(string(m))
}
}
})
}
func Decrypt(m []byte, k string) (r string, e error) {
var b cipher.Block
if b, e = aes.NewCipher([]byte(k)); e == nil {
var iv []byte
iv, m = Unpack(m)
c := cipher.NewCBCDecrypter(b, iv)
c.CryptBlocks(m, m)
r = Dequantise(m)
}
return
}
func Unpack(m []byte) (iv, r []byte) {
return m[:aes.BlockSize], m[aes.BlockSize:]
}
func Dequantise(m []byte) string {
var i int
for i = len(m) - 1; i > 0 && m[i] == 0; i-- {}
return string(m[:i + 1])
}
func Request(a string, f func(Conn)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := DialUDP("udp", nil, address); e == nil {
defer conn.Close()
f(conn)
}
}
}
go for the would-be network programmer http://slides.games-with-brains.net/17
package main
import "bufio"
import "crypto/cipher"
import "crypto/aes"
import . "fmt"
import . "net"
const AES_KEY = "0123456789012345"
func main() {
Request(":1025", func(c *UDPConn) {
c.Write(make([]byte, 1))
if m, e := ReadStream(c); e == nil {
if m, e := Decrypt(m, AES_KEY); e == nil {
Println(string(m))
}
}
})
}
func Decrypt(m []byte, k string) (r string, e error) {
var b cipher.Block
if b, e = aes.NewCipher([]byte(k)); e == nil {
var iv []byte
iv, m = Unpack(m)
c := cipher.NewCBCDecrypter(b, iv)
c.CryptBlocks(m, m)
r = Dequantise(m)
}
return
}
func Unpack(m []byte) (iv, r []byte) {
return m[:aes.BlockSize], m[aes.BlockSize:]
}
func Dequantise(m []byte) string {
var i int
for i = len(m) - 1; i > 0 && m[i] == 0; i-- {}
return string(m[:i + 1])
}
func Request(a string, f func(Conn)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := DialUDP("udp", nil, address); e == nil {
defer conn.Close()
f(conn)
}
}
}
go for the would-be network programmer http://slides.games-with-brains.net/18
package main
import "bufio"
import "crypto/cipher"
import "crypto/aes"
import . "fmt"
import . "net"
const AES_KEY = "0123456789012345"
func main() {
Request(":1025", func(c *UDPConn) {
c.Write(make([]byte, 1))
if m, e := ReadStream(c); e == nil {
if m, e := Decrypt(m, AES_KEY); e == nil {
Println(string(m))
}
}
})
}
func Decrypt(m []byte, k string) (r string, e error) {
var b cipher.Block
if b, e = aes.NewCipher([]byte(k)); e == nil {
var iv []byte
iv, m = Unpack(m)
c := cipher.NewCBCDecrypter(b, iv)
c.CryptBlocks(m, m)
r = Dequantise(m)
}
return
}
func Unpack(m []byte) (iv, r []byte) {
return m[:aes.BlockSize], m[aes.BlockSize:]
}
func Dequantise(m []byte) string {
var i int
for i = len(m) - 1; i > 0 && m[i] == 0; i-- {}
return string(m[:i + 1])
}
func Request(a string, f func(Conn)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := DialUDP("udp", nil, address); e == nil {
defer conn.Close()
f(conn)
}
}
}
go for the would-be network programmer http://slides.games-with-brains.net/19
package main
import "bufio"
import "crypto/cipher"
import "crypto/aes"
import . "fmt"
import . "net"
const AES_KEY = "0123456789012345"
func main() {
Request(":1025", func(c *UDPConn) {
c.Write(make([]byte, 1))
if m, e := ReadStream(c); e == nil {
if m, e := Decrypt(m, AES_KEY); e == nil {
Println(string(m))
}
}
})
}
func Decrypt(m []byte, k string) (r string, e error) {
var b cipher.Block
if b, e = aes.NewCipher([]byte(k)); e == nil {
var iv []byte
iv, m = Unpack(m)
c := cipher.NewCBCDecrypter(b, iv)
c.CryptBlocks(m, m)
r = Dequantise(m)
}
return
}
func Unpack(m []byte) (iv, r []byte) {
return m[:aes.BlockSize], m[aes.BlockSize:]
}
func Dequantise(m []byte) string {
var i int
for i = len(m) - 1; i > 0 && m[i] == 0; i-- {}
return string(m[:i + 1])
}
func Request(a string, f func(Conn)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := DialUDP("udp", nil, address); e == nil {
defer conn.Close()
f(conn)
}
}
}
go for the would-be network programmer http://slides.games-with-brains.net/20
udp/rsa server
package main
import . "bytes"
import "crypto/rsa"
import "encoding/gob"
import "net"
func main() {
HELLO_WORLD := []byte("Hello World")
RSA_LABEL := []byte("served")
Serve(":1025", func(c *net.UDPConn, a *net.UDPAddr, b []byte) {
var key rsa.PublicKey
if e := gob.NewDecoder(NewBuffer(b)).Decode(&key); e == nil {
if m, e := Encrypt(&key, HELLO_WORLD, RSA_LABEL); e == nil {
c.WriteToUDP(m, a)
}
}
return
})
}
func Encrypt(key *rsa.PublicKey, m, l []byte) ([]byte, error) {
return rsa.EncryptOAEP(sha1.New(), rand.Reader, key, m, l)
}
func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := ListenUDP("udp", address); e == nil {
for b := make([]byte, 1024); ; b = make([]byte, 1024) {
if n, client, e := conn.ReadFromUDP(b); e == nil {
go f(conn, client, b[:n])
}
}
}
}
return
}
go for the would-be network programmer http://slides.games-with-brains.net/22
udp/rsa client
package main
import "crypto/rsa"
import "crypto/rand"
import "crypto/sha1"
import "crypto/x509"
import "bytes"
import "encoding/gob"
import "encoding/pem"
import “io/ioutil"
import . "fmt"
import . "net"
func main() {
Request(":1025", "ckey", func(c *net.UDPConn, k *rsa.PrivateKey) {
if m, e := ReadStream(c); e == nil {
if m, e := Decrypt(k, m, []byte("served")); e == nil {
Println(string(m))
}
}
})
}
func LoadPrivateKey(file string) (r *rsa.PrivateKey, e error) {
if file, e := ioutil.ReadFile(file); e == nil {
if block, _ := pem.Decode(file); block != nil {
if block.Type == "RSA PRIVATE KEY" {
r, e = x509.ParsePKCS1PrivateKey(block.Bytes)
}
}
}
return
}
func Request(a, file string, f func(*UDPConn, *PrivateKey)) {
if k, e := LoadPrivateKey(file); e == nil {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := DialUDP("udp", nil, address); e == nil {
defer conn.Close()
SendKey(conn, k.PublicKey, func() {
f(conn, k)
})
}
}
}
}
func Decrypt(key *rsa.PrivateKey, m, l []byte) ([]byte, error) {
return rsa.DecryptOAEP(sha1.New(), rand.Reader, key, m, l)
}
func SendKey(c *net.UDPConn, k rsa.PublicKey, f func()) {
var b bytes.Buffer
if e := gob.NewEncoder(&b).Encode(k); e == nil {
if _, e = c.Write(b.Bytes()); e == nil {
f()
}
}
}
go for the would-be network programmer http://slides.games-with-brains.net/24
package main
import "crypto/rsa"
import "crypto/rand"
import "crypto/sha1"
import "crypto/x509"
import "bytes"
import "encoding/gob"
import "encoding/pem"
import “io/ioutil"
import . "fmt"
import . "net"
func main() {
Request(":1025", "ckey", func(c *net.UDPConn, k *rsa.PrivateKey) {
if m, e := ReadStream(c); e == nil {
if m, e := Decrypt(k, m, []byte("served")); e == nil {
Println(string(m))
}
}
})
}
func LoadPrivateKey(file string) (r *rsa.PrivateKey, e error) {
if file, e := ioutil.ReadFile(file); e == nil {
if block, _ := pem.Decode(file); block != nil {
if block.Type == "RSA PRIVATE KEY" {
r, e = x509.ParsePKCS1PrivateKey(block.Bytes)
}
}
}
return
}
func Request(a, file string, f func(*UDPConn, *PrivateKey)) {
if k, e := LoadPrivateKey(file); e == nil {
if address, e := ResolveUDPAddr("udp", a); e == nil {
if conn, e := DialUDP("udp", nil, address); e == nil {
defer conn.Close()
SendKey(conn, k.PublicKey, func() {
f(conn, k)
})
}
}
}
}
func Decrypt(key *rsa.PrivateKey, m, l []byte) ([]byte, error) {
return rsa.DecryptOAEP(sha1.New(), rand.Reader, key, m, l)
}
func SendKey(c *net.UDPConn, k rsa.PublicKey, f func()) {
var b bytes.Buffer
if e := gob.NewEncoder(&b).Encode(k); e == nil {
if _, e = c.Write(b.Bytes()); e == nil {
f()
}
}
}
go for the would-be network programmer http://slides.games-with-brains.net/25
slideshare://feyeleanor

More Related Content

What's hot

The Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveThe Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveEleanor McHugh
 
Go for the would be network programmer
Go for the would be network programmerGo for the would be network programmer
Go for the would be network programmerEleanor McHugh
 
Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxEleanor McHugh
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giantsIan Barber
 
Computer Networks Lab File
Computer Networks Lab FileComputer Networks Lab File
Computer Networks Lab FileKandarp Tiwari
 
Playing 44CON CTF for fun and profit
Playing 44CON CTF for fun and profitPlaying 44CON CTF for fun and profit
Playing 44CON CTF for fun and profit44CON
 
Distributed Data Structures
Distributed Data StructuresDistributed Data Structures
Distributed Data StructuresPDX Web & Design
 
Assignment no39
Assignment no39Assignment no39
Assignment no39Jay Patel
 
Python postgre sql a wonderful wedding
Python postgre sql   a wonderful weddingPython postgre sql   a wonderful wedding
Python postgre sql a wonderful weddingStéphane Wirtel
 
Степан Кольцов — Rust — лучше, чем C++
Степан Кольцов — Rust — лучше, чем C++Степан Кольцов — Rust — лучше, чем C++
Степан Кольцов — Rust — лучше, чем C++Yandex
 
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014Fantix King 王川
 
Diving into byte code optimization in python
Diving into byte code optimization in python Diving into byte code optimization in python
Diving into byte code optimization in python Chetan Giridhar
 
Going Loopy: Adventures in Iteration with Go
Going Loopy: Adventures in Iteration with GoGoing Loopy: Adventures in Iteration with Go
Going Loopy: Adventures in Iteration with GoEleanor McHugh
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in GeckoChih-Hsuan Kuo
 

What's hot (20)

Binomial heap
Binomial heapBinomial heap
Binomial heap
 
The Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's PerspectiveThe Browser Environment - A Systems Programmer's Perspective
The Browser Environment - A Systems Programmer's Perspective
 
Go for the would be network programmer
Go for the would be network programmerGo for the would be network programmer
Go for the would be network programmer
 
Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 redux
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giants
 
Computer Networks Lab File
Computer Networks Lab FileComputer Networks Lab File
Computer Networks Lab File
 
Playing 44CON CTF for fun and profit
Playing 44CON CTF for fun and profitPlaying 44CON CTF for fun and profit
Playing 44CON CTF for fun and profit
 
Distributed Data Structures
Distributed Data StructuresDistributed Data Structures
Distributed Data Structures
 
Assignment no39
Assignment no39Assignment no39
Assignment no39
 
Usp
UspUsp
Usp
 
part2
part2part2
part2
 
Introducing to Asynchronous Programming
Introducing to Asynchronous  ProgrammingIntroducing to Asynchronous  Programming
Introducing to Asynchronous Programming
 
Python postgre sql a wonderful wedding
Python postgre sql   a wonderful weddingPython postgre sql   a wonderful wedding
Python postgre sql a wonderful wedding
 
Степан Кольцов — Rust — лучше, чем C++
Степан Кольцов — Rust — лучше, чем C++Степан Кольцов — Rust — лучше, чем C++
Степан Кольцов — Rust — лучше, чем C++
 
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014
 
C++ L08-Classes Part1
C++ L08-Classes Part1C++ L08-Classes Part1
C++ L08-Classes Part1
 
Rust
RustRust
Rust
 
Diving into byte code optimization in python
Diving into byte code optimization in python Diving into byte code optimization in python
Diving into byte code optimization in python
 
Going Loopy: Adventures in Iteration with Go
Going Loopy: Adventures in Iteration with GoGoing Loopy: Adventures in Iteration with Go
Going Loopy: Adventures in Iteration with Go
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in Gecko
 

Similar to Encrypt all transports

Roberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + ProcessingRoberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + ProcessingDemetrio Siragusa
 
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+ConFoo
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyYasuharu Nakano
 
ikh331-06-distributed-programming
ikh331-06-distributed-programmingikh331-06-distributed-programming
ikh331-06-distributed-programmingAnung Ariwibowo
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with PythonHan Lee
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleIan Barber
 
Non Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaNon Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaFrank Lyaruu
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript IntroductionDmitry Sheiko
 
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeGDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeKAI CHU CHUNG
 
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)AvitoTech
 
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiMonitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiInfluxData
 
Go: It's Not Just For Google
Go: It's Not Just For GoogleGo: It's Not Just For Google
Go: It's Not Just For GoogleEleanor McHugh
 
Chapter 4 slides
Chapter 4 slidesChapter 4 slides
Chapter 4 slideslara_ays
 

Similar to Encrypt all transports (20)

Roberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + ProcessingRoberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
 
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
 
C++ programs
C++ programsC++ programs
C++ programs
 
#2 (UDP)
#2 (UDP)#2 (UDP)
#2 (UDP)
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
 
ikh331-06-distributed-programming
ikh331-06-distributed-programmingikh331-06-distributed-programming
ikh331-06-distributed-programming
 
Arp
ArpArp
Arp
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with Python
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
 
Winform
WinformWinform
Winform
 
Introduction to asyncio
Introduction to asyncioIntroduction to asyncio
Introduction to asyncio
 
Non Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaNon Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJava
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeGDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
 
ES6 Overview
ES6 OverviewES6 Overview
ES6 Overview
 
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
 
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiMonitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
 
Go: It's Not Just For Google
Go: It's Not Just For GoogleGo: It's Not Just For Google
Go: It's Not Just For Google
 
Chapter 4 slides
Chapter 4 slidesChapter 4 slides
Chapter 4 slides
 
Ss
SsSs
Ss
 

More from Eleanor McHugh

[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdfEleanor McHugh
 
Generics, Reflection, and Efficient Collections
Generics, Reflection, and Efficient CollectionsGenerics, Reflection, and Efficient Collections
Generics, Reflection, and Efficient CollectionsEleanor McHugh
 
The Relevance of Liveness - Biometrics and Data Integrity
The Relevance of Liveness - Biometrics and Data IntegrityThe Relevance of Liveness - Biometrics and Data Integrity
The Relevance of Liveness - Biometrics and Data IntegrityEleanor McHugh
 
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]Eleanor McHugh
 
Go for the paranoid network programmer, 3rd edition
Go for the paranoid network programmer, 3rd editionGo for the paranoid network programmer, 3rd edition
Go for the paranoid network programmer, 3rd editionEleanor McHugh
 
An introduction to functional programming with Go [redux]
An introduction to functional programming with Go [redux]An introduction to functional programming with Go [redux]
An introduction to functional programming with Go [redux]Eleanor McHugh
 
An introduction to functional programming with go
An introduction to functional programming with goAn introduction to functional programming with go
An introduction to functional programming with goEleanor McHugh
 
Identity & trust in Monitored Spaces
Identity & trust in Monitored SpacesIdentity & trust in Monitored Spaces
Identity & trust in Monitored SpacesEleanor McHugh
 
Don't Ask, Don't Tell - The Virtues of Privacy By Design
Don't Ask, Don't Tell - The Virtues of Privacy By DesignDon't Ask, Don't Tell - The Virtues of Privacy By Design
Don't Ask, Don't Tell - The Virtues of Privacy By DesignEleanor McHugh
 
Don't ask, don't tell the virtues of privacy by design
Don't ask, don't tell   the virtues of privacy by designDon't ask, don't tell   the virtues of privacy by design
Don't ask, don't tell the virtues of privacy by designEleanor McHugh
 
Anonymity, identity, trust
Anonymity, identity, trustAnonymity, identity, trust
Anonymity, identity, trustEleanor McHugh
 
Going Loopy - Adventures in Iteration with Google Go
Going Loopy - Adventures in Iteration with Google GoGoing Loopy - Adventures in Iteration with Google Go
Going Loopy - Adventures in Iteration with Google GoEleanor McHugh
 
Distributed Ledgers: Anonymity & Immutability at Scale
Distributed Ledgers: Anonymity & Immutability at ScaleDistributed Ledgers: Anonymity & Immutability at Scale
Distributed Ledgers: Anonymity & Immutability at ScaleEleanor McHugh
 
Go for the paranoid network programmer, 2nd edition
Go for the paranoid network programmer, 2nd editionGo for the paranoid network programmer, 2nd edition
Go for the paranoid network programmer, 2nd editionEleanor McHugh
 
Finding a useful outlet for my many Adventures in go
Finding a useful outlet for my many Adventures in goFinding a useful outlet for my many Adventures in go
Finding a useful outlet for my many Adventures in goEleanor McHugh
 
Anonymity, trust, accountability
Anonymity, trust, accountabilityAnonymity, trust, accountability
Anonymity, trust, accountabilityEleanor McHugh
 
Implementing Virtual Machines in Go & C
Implementing Virtual Machines in Go & CImplementing Virtual Machines in Go & C
Implementing Virtual Machines in Go & CEleanor McHugh
 
Implementing Virtual Machines in Ruby & C
Implementing Virtual Machines in Ruby & CImplementing Virtual Machines in Ruby & C
Implementing Virtual Machines in Ruby & CEleanor McHugh
 
Privacy is always a requirement
Privacy is always a requirementPrivacy is always a requirement
Privacy is always a requirementEleanor McHugh
 

More from Eleanor McHugh (20)

[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
 
Generics, Reflection, and Efficient Collections
Generics, Reflection, and Efficient CollectionsGenerics, Reflection, and Efficient Collections
Generics, Reflection, and Efficient Collections
 
The Relevance of Liveness - Biometrics and Data Integrity
The Relevance of Liveness - Biometrics and Data IntegrityThe Relevance of Liveness - Biometrics and Data Integrity
The Relevance of Liveness - Biometrics and Data Integrity
 
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
The Browser Environment - A Systems Programmer's Perspective [sinatra edition]
 
Go for the paranoid network programmer, 3rd edition
Go for the paranoid network programmer, 3rd editionGo for the paranoid network programmer, 3rd edition
Go for the paranoid network programmer, 3rd edition
 
An introduction to functional programming with Go [redux]
An introduction to functional programming with Go [redux]An introduction to functional programming with Go [redux]
An introduction to functional programming with Go [redux]
 
An introduction to functional programming with go
An introduction to functional programming with goAn introduction to functional programming with go
An introduction to functional programming with go
 
Identity & trust in Monitored Spaces
Identity & trust in Monitored SpacesIdentity & trust in Monitored Spaces
Identity & trust in Monitored Spaces
 
Don't Ask, Don't Tell - The Virtues of Privacy By Design
Don't Ask, Don't Tell - The Virtues of Privacy By DesignDon't Ask, Don't Tell - The Virtues of Privacy By Design
Don't Ask, Don't Tell - The Virtues of Privacy By Design
 
Don't ask, don't tell the virtues of privacy by design
Don't ask, don't tell   the virtues of privacy by designDon't ask, don't tell   the virtues of privacy by design
Don't ask, don't tell the virtues of privacy by design
 
Anonymity, identity, trust
Anonymity, identity, trustAnonymity, identity, trust
Anonymity, identity, trust
 
Going Loopy - Adventures in Iteration with Google Go
Going Loopy - Adventures in Iteration with Google GoGoing Loopy - Adventures in Iteration with Google Go
Going Loopy - Adventures in Iteration with Google Go
 
Distributed Ledgers: Anonymity & Immutability at Scale
Distributed Ledgers: Anonymity & Immutability at ScaleDistributed Ledgers: Anonymity & Immutability at Scale
Distributed Ledgers: Anonymity & Immutability at Scale
 
Hello Go
Hello GoHello Go
Hello Go
 
Go for the paranoid network programmer, 2nd edition
Go for the paranoid network programmer, 2nd editionGo for the paranoid network programmer, 2nd edition
Go for the paranoid network programmer, 2nd edition
 
Finding a useful outlet for my many Adventures in go
Finding a useful outlet for my many Adventures in goFinding a useful outlet for my many Adventures in go
Finding a useful outlet for my many Adventures in go
 
Anonymity, trust, accountability
Anonymity, trust, accountabilityAnonymity, trust, accountability
Anonymity, trust, accountability
 
Implementing Virtual Machines in Go & C
Implementing Virtual Machines in Go & CImplementing Virtual Machines in Go & C
Implementing Virtual Machines in Go & C
 
Implementing Virtual Machines in Ruby & C
Implementing Virtual Machines in Ruby & CImplementing Virtual Machines in Ruby & C
Implementing Virtual Machines in Ruby & C
 
Privacy is always a requirement
Privacy is always a requirementPrivacy is always a requirement
Privacy is always a requirement
 

Recently uploaded

What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 

Recently uploaded (20)

What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 

Encrypt all transports

  • 3. package main import . "fmt" import . "net/http" const ADDRESS = ":443" func main() { message := "hello world" HandleFunc("/hello", func(w ResponseWriter, r *Request) { w.Header().Set("Content-Type", "text/plain") Fprintf(w, message) }) ListenAndServeTLS(ADDRESS, "cert.pem", "key.pem", nil) } go for the would-be network programmer http://slides.games-with-brains.net/3
  • 4. package main import . "fmt" import . "net/http" const ADDRESS = ":443" func main() { message := "hello world" HandleFunc("/hello", func(w ResponseWriter, r *Request) { w.Header().Set("Content-Type", "text/plain") Fprintf(w, message) }) ListenAndServeTLS(ADDRESS, "cert.pem", "key.pem", nil) } go for the would-be network programmer http://slides.games-with-brains.net/4
  • 6. package main import "crypto/rand" import "crypto/tls" import . "fmt" func main() { ListenTLS(":443", ConfigTLS("scert", "skey"), func(c *tls.Conn) { Fprintln(c, "hello world") }) } func ListenTLS(a string, conf *tls.Config, f func(*tls.Conn)) { if listener, e := tls.Listen("tcp", a, conf); e == nil { for { if connection, e := listener.Accept(); e == nil { go func(c *tls.Conn) { defer c.Close() f(c) }(connection.(*tls.Conn)) } } } } func ConfigTLS(c, k string) (r *tls.Config) { if cert, e := tls.LoadX509KeyPair(c, k); e == nil { r = &tls.Config{ Certificates: []tls.Certificate{ cert }, Rand: rand.Reader, } } return } go for the would-be network programmer http://slides.games-with-brains.net/6
  • 7. package main import "crypto/rand" import "crypto/tls" import . "fmt" func main() { ListenTLS(":443", ConfigTLS("scert", "skey"), func(c *tls.Conn) { Fprintln(c, "hello world") }) } func ListenTLS(a string, conf *tls.Config, f func(*tls.Conn)) { if listener, e := tls.Listen("tcp", a, conf); e == nil { for { if connection, e := listener.Accept(); e == nil { go func(c *tls.Conn) { defer c.Close() f(c) }(connection.(*tls.Conn)) } } } } func ConfigTLS(c, k string) (r *tls.Config) { if cert, e := tls.LoadX509KeyPair(c, k); e == nil { r = &tls.Config{ Certificates: []tls.Certificate{ cert }, Rand: rand.Reader, } } return } go for the would-be network programmer http://slides.games-with-brains.net/7
  • 9. package main import . "fmt" import "bufio" import "net" import “crypto/tls" func main() { DialTLS(":1025", ConfigTLS("ccert", "ckey"), func(c net.Conn) { if m, e := bufio.NewReader(c).ReadString('n'); e == nil { Printf(m) } }) } func ConfigTLS(c, k string) (r *tls.Config) { if cert, e := tls.LoadX509KeyPair(c, k); e == nil { r = &tls.Config{ Certificates: []tls.Certificate{ cert }, InsecureSkipVerify: false, } } return } func DialTLS(a string, conf *tls.Config, f func(net.Conn)) { if c, e := tls.Dial("tcp", a, conf); e == nil { defer c.Close() f(c) } } go for the would-be network programmer http://slides.games-with-brains.net/9
  • 10. package main import . "fmt" import "bufio" import "net" import “crypto/tls" func main() { DialTLS(":1025", ConfigTLS("ccert", "ckey"), func(c net.Conn) { if m, e := bufio.NewReader(c).ReadString('n'); e == nil { Printf(m) } }) } func ConfigTLS(c, k string) (r *tls.Config) { if cert, e := tls.LoadX509KeyPair(c, k); e == nil { r = &tls.Config{ Certificates: []tls.Certificate{ cert }, InsecureSkipVerify: true, } } return } func DialTLS(a string, conf *tls.Config, f func(net.Conn)) { if c, e := tls.Dial("tcp", a, conf); e == nil { defer c.Close() f(c) } } go for the would-be network programmer http://slides.games-with-brains.net/10
  • 12. package main import "crypto/aes" import "crypto/cipher" import "crypto/rand" import . "net" const AES_KEY = "0123456789012345" func main() { Serve(":1025", func(c *UDPConn, a *UDPAddr, b []byte) { if m, e := Encrypt("Hello World", AES_KEY); e == nil { c.WriteToUDP(m, a) } }) } func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := ListenUDP("udp", address); e == nil { for b := make([]byte, 1024); ; b = make([]byte, 1024) { if n, client, e := conn.ReadFromUDP(b); e == nil { go f(conn, client, b[:n]) } } } } return } func Quantise(m string) (b []byte, e error) { b = append(b, m...) if p := len(b) % aes.BlockSize; p != 0 { p = aes.BlockSize - p // this is insecure and inflexible as we're padding with NUL b = append(b, make([]byte, p)...) } return } func IV() (b []byte, e error) { b = make([]byte, aes.BlockSize) _, e = rand.Read(b) return } func Encrypt(m, k string) (o []byte, e error) { if o, e = Quantise([]byte(m)); e == nil { var b cipher.Block if b, e = aes.NewCipher([]byte(k)); e == nil { var iv []byte if iv, e = IV(); e == nil { c := cipher.NewCBCEncrypter(b, iv) c.CryptBlocks(o, o) o = append(iv, o...) } } } return } go for the would-be network programmer http://slides.games-with-brains.net/12
  • 13. package main import "crypto/aes" import "crypto/cipher" import "crypto/rand" import . "net" const AES_KEY = "0123456789012345" func main() { Serve(":1025", func(c *UDPConn, a *UDPAddr, b []byte) { if m, e := Encrypt("Hello World", AES_KEY); e == nil { c.WriteToUDP(m, a) } }) } func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := ListenUDP("udp", address); e == nil { for b := make([]byte, 1024); ; b = make([]byte, 1024) { if n, client, e := conn.ReadFromUDP(b); e == nil { go f(conn, client, b[:n]) } } } } return } func Quantise(m string) (b []byte, e error) { b = append(b, m...) if p := len(b) % aes.BlockSize; p != 0 { p = aes.BlockSize - p // this is insecure and inflexible as we're padding with NUL b = append(b, make([]byte, p)...) } return } func IV() (b []byte, e error) { b = make([]byte, aes.BlockSize) _, e = rand.Read(b) return } func Encrypt(m, k string) (o []byte, e error) { if o, e = Quantise([]byte(m)); e == nil { var b cipher.Block if b, e = aes.NewCipher([]byte(k)); e == nil { var iv []byte if iv, e = IV(); e == nil { c := cipher.NewCBCEncrypter(b, iv) c.CryptBlocks(o, o) o = append(iv, o...) } } } return } go for the would-be network programmer http://slides.games-with-brains.net/13
  • 14. package main import "crypto/aes" import "crypto/cipher" import "crypto/rand" import . "net" const AES_KEY = "0123456789012345" func main() { Serve(":1025", func(c *UDPConn, a *UDPAddr, b []byte) { if m, e := Encrypt("Hello World", AES_KEY); e == nil { c.WriteToUDP(m, a) } }) } func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := ListenUDP("udp", address); e == nil { for b := make([]byte, 1024); ; b = make([]byte, 1024) { if n, client, e := conn.ReadFromUDP(b); e == nil { go f(conn, client, b[:n]) } } } } return } func Quantise(m string) (b []byte, e error) { b = append(b, m...) if p := len(b) % aes.BlockSize; p != 0 { p = aes.BlockSize - p // this is insecure and inflexible as we're padding with NUL b = append(b, make([]byte, p)...) } return } func IV() (b []byte, e error) { b = make([]byte, aes.BlockSize) _, e = rand.Read(b) return } func Encrypt(m, k string) (o []byte, e error) { if o, e = Quantise([]byte(m)); e == nil { var b cipher.Block if b, e = aes.NewCipher([]byte(k)); e == nil { var iv []byte if iv, e = IV(); e == nil { c := cipher.NewCBCEncrypter(b, iv) c.CryptBlocks(o, o) o = append(iv, o...) } } } return } go for the would-be network programmer http://slides.games-with-brains.net/14
  • 15. package main import "crypto/aes" import "crypto/cipher" import "crypto/rand" import . "net" const AES_KEY = "0123456789012345" func main() { Serve(":1025", func(c *UDPConn, a *UDPAddr, b []byte) { if m, e := Encrypt("Hello World", AES_KEY); e == nil { c.WriteToUDP(m, a) } }) } func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := ListenUDP("udp", address); e == nil { for b := make([]byte, 1024); ; b = make([]byte, 1024) { if n, client, e := conn.ReadFromUDP(b); e == nil { go f(conn, client, b[:n]) } } } } return } func Quantise(m string) (b []byte, e error) { b = append(b, m...) if p := len(b) % aes.BlockSize; p != 0 { p = aes.BlockSize - p // this is insecure and inflexible as we're padding with NUL b = append(b, make([]byte, p)...) } return } func IV() (b []byte, e error) { b = make([]byte, aes.BlockSize) _, e = rand.Read(b) return } func Encrypt(m, k string) (o []byte, e error) { if o, e = Quantise([]byte(m)); e == nil { var b cipher.Block if b, e = aes.NewCipher([]byte(k)); e == nil { var iv []byte if iv, e = IV(); e == nil { c := cipher.NewCBCEncrypter(b, iv) c.CryptBlocks(o, o) o = append(iv, o...) } } } return } go for the would-be network programmer http://slides.games-with-brains.net/15
  • 17. package main import "bufio" import "crypto/cipher" import "crypto/aes" import . "fmt" import . "net" const AES_KEY = "0123456789012345" func main() { Request(":1025", func(c *UDPConn) { c.Write(make([]byte, 1)) if m, e := ReadStream(c); e == nil { if m, e := Decrypt(m, AES_KEY); e == nil { Println(string(m)) } } }) } func Decrypt(m []byte, k string) (r string, e error) { var b cipher.Block if b, e = aes.NewCipher([]byte(k)); e == nil { var iv []byte iv, m = Unpack(m) c := cipher.NewCBCDecrypter(b, iv) c.CryptBlocks(m, m) r = Dequantise(m) } return } func Unpack(m []byte) (iv, r []byte) { return m[:aes.BlockSize], m[aes.BlockSize:] } func Dequantise(m []byte) string { var i int for i = len(m) - 1; i > 0 && m[i] == 0; i-- {} return string(m[:i + 1]) } func Request(a string, f func(Conn)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := DialUDP("udp", nil, address); e == nil { defer conn.Close() f(conn) } } } go for the would-be network programmer http://slides.games-with-brains.net/17
  • 18. package main import "bufio" import "crypto/cipher" import "crypto/aes" import . "fmt" import . "net" const AES_KEY = "0123456789012345" func main() { Request(":1025", func(c *UDPConn) { c.Write(make([]byte, 1)) if m, e := ReadStream(c); e == nil { if m, e := Decrypt(m, AES_KEY); e == nil { Println(string(m)) } } }) } func Decrypt(m []byte, k string) (r string, e error) { var b cipher.Block if b, e = aes.NewCipher([]byte(k)); e == nil { var iv []byte iv, m = Unpack(m) c := cipher.NewCBCDecrypter(b, iv) c.CryptBlocks(m, m) r = Dequantise(m) } return } func Unpack(m []byte) (iv, r []byte) { return m[:aes.BlockSize], m[aes.BlockSize:] } func Dequantise(m []byte) string { var i int for i = len(m) - 1; i > 0 && m[i] == 0; i-- {} return string(m[:i + 1]) } func Request(a string, f func(Conn)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := DialUDP("udp", nil, address); e == nil { defer conn.Close() f(conn) } } } go for the would-be network programmer http://slides.games-with-brains.net/18
  • 19. package main import "bufio" import "crypto/cipher" import "crypto/aes" import . "fmt" import . "net" const AES_KEY = "0123456789012345" func main() { Request(":1025", func(c *UDPConn) { c.Write(make([]byte, 1)) if m, e := ReadStream(c); e == nil { if m, e := Decrypt(m, AES_KEY); e == nil { Println(string(m)) } } }) } func Decrypt(m []byte, k string) (r string, e error) { var b cipher.Block if b, e = aes.NewCipher([]byte(k)); e == nil { var iv []byte iv, m = Unpack(m) c := cipher.NewCBCDecrypter(b, iv) c.CryptBlocks(m, m) r = Dequantise(m) } return } func Unpack(m []byte) (iv, r []byte) { return m[:aes.BlockSize], m[aes.BlockSize:] } func Dequantise(m []byte) string { var i int for i = len(m) - 1; i > 0 && m[i] == 0; i-- {} return string(m[:i + 1]) } func Request(a string, f func(Conn)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := DialUDP("udp", nil, address); e == nil { defer conn.Close() f(conn) } } } go for the would-be network programmer http://slides.games-with-brains.net/19
  • 20. package main import "bufio" import "crypto/cipher" import "crypto/aes" import . "fmt" import . "net" const AES_KEY = "0123456789012345" func main() { Request(":1025", func(c *UDPConn) { c.Write(make([]byte, 1)) if m, e := ReadStream(c); e == nil { if m, e := Decrypt(m, AES_KEY); e == nil { Println(string(m)) } } }) } func Decrypt(m []byte, k string) (r string, e error) { var b cipher.Block if b, e = aes.NewCipher([]byte(k)); e == nil { var iv []byte iv, m = Unpack(m) c := cipher.NewCBCDecrypter(b, iv) c.CryptBlocks(m, m) r = Dequantise(m) } return } func Unpack(m []byte) (iv, r []byte) { return m[:aes.BlockSize], m[aes.BlockSize:] } func Dequantise(m []byte) string { var i int for i = len(m) - 1; i > 0 && m[i] == 0; i-- {} return string(m[:i + 1]) } func Request(a string, f func(Conn)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := DialUDP("udp", nil, address); e == nil { defer conn.Close() f(conn) } } } go for the would-be network programmer http://slides.games-with-brains.net/20
  • 22. package main import . "bytes" import "crypto/rsa" import "encoding/gob" import "net" func main() { HELLO_WORLD := []byte("Hello World") RSA_LABEL := []byte("served") Serve(":1025", func(c *net.UDPConn, a *net.UDPAddr, b []byte) { var key rsa.PublicKey if e := gob.NewDecoder(NewBuffer(b)).Decode(&key); e == nil { if m, e := Encrypt(&key, HELLO_WORLD, RSA_LABEL); e == nil { c.WriteToUDP(m, a) } } return }) } func Encrypt(key *rsa.PublicKey, m, l []byte) ([]byte, error) { return rsa.EncryptOAEP(sha1.New(), rand.Reader, key, m, l) } func Serve(a string, f func(*UDPConn, *UDPAddr, []byte)) { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := ListenUDP("udp", address); e == nil { for b := make([]byte, 1024); ; b = make([]byte, 1024) { if n, client, e := conn.ReadFromUDP(b); e == nil { go f(conn, client, b[:n]) } } } } return } go for the would-be network programmer http://slides.games-with-brains.net/22
  • 24. package main import "crypto/rsa" import "crypto/rand" import "crypto/sha1" import "crypto/x509" import "bytes" import "encoding/gob" import "encoding/pem" import “io/ioutil" import . "fmt" import . "net" func main() { Request(":1025", "ckey", func(c *net.UDPConn, k *rsa.PrivateKey) { if m, e := ReadStream(c); e == nil { if m, e := Decrypt(k, m, []byte("served")); e == nil { Println(string(m)) } } }) } func LoadPrivateKey(file string) (r *rsa.PrivateKey, e error) { if file, e := ioutil.ReadFile(file); e == nil { if block, _ := pem.Decode(file); block != nil { if block.Type == "RSA PRIVATE KEY" { r, e = x509.ParsePKCS1PrivateKey(block.Bytes) } } } return } func Request(a, file string, f func(*UDPConn, *PrivateKey)) { if k, e := LoadPrivateKey(file); e == nil { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := DialUDP("udp", nil, address); e == nil { defer conn.Close() SendKey(conn, k.PublicKey, func() { f(conn, k) }) } } } } func Decrypt(key *rsa.PrivateKey, m, l []byte) ([]byte, error) { return rsa.DecryptOAEP(sha1.New(), rand.Reader, key, m, l) } func SendKey(c *net.UDPConn, k rsa.PublicKey, f func()) { var b bytes.Buffer if e := gob.NewEncoder(&b).Encode(k); e == nil { if _, e = c.Write(b.Bytes()); e == nil { f() } } } go for the would-be network programmer http://slides.games-with-brains.net/24
  • 25. package main import "crypto/rsa" import "crypto/rand" import "crypto/sha1" import "crypto/x509" import "bytes" import "encoding/gob" import "encoding/pem" import “io/ioutil" import . "fmt" import . "net" func main() { Request(":1025", "ckey", func(c *net.UDPConn, k *rsa.PrivateKey) { if m, e := ReadStream(c); e == nil { if m, e := Decrypt(k, m, []byte("served")); e == nil { Println(string(m)) } } }) } func LoadPrivateKey(file string) (r *rsa.PrivateKey, e error) { if file, e := ioutil.ReadFile(file); e == nil { if block, _ := pem.Decode(file); block != nil { if block.Type == "RSA PRIVATE KEY" { r, e = x509.ParsePKCS1PrivateKey(block.Bytes) } } } return } func Request(a, file string, f func(*UDPConn, *PrivateKey)) { if k, e := LoadPrivateKey(file); e == nil { if address, e := ResolveUDPAddr("udp", a); e == nil { if conn, e := DialUDP("udp", nil, address); e == nil { defer conn.Close() SendKey(conn, k.PublicKey, func() { f(conn, k) }) } } } } func Decrypt(key *rsa.PrivateKey, m, l []byte) ([]byte, error) { return rsa.DecryptOAEP(sha1.New(), rand.Reader, key, m, l) } func SendKey(c *net.UDPConn, k rsa.PublicKey, f func()) { var b bytes.Buffer if e := gob.NewEncoder(&b).Encode(k); e == nil { if _, e = c.Write(b.Bytes()); e == nil { f() } } } go for the would-be network programmer http://slides.games-with-brains.net/25