没有合适的资源?快使用搜索试试~ 我知道了~
首页Go语言加密算法实践 Practical Cryptography With Go(英文版).pdf
资源详情
资源评论
资源推荐

2018/4/19 Read Practical Cryptography With Go | Leanpub
https://leanpub.com/gocrypto/read#leanpub-auto-select-bibliography 1/67
Practical Cryptography With
Go
Practical Cryptography With Go
Buy on Leanpub
Table of Contents
Chapter 1: Introduction
Chapter 2: Engineering concerns and platform
security
Basic security
Specifications
On errors
Input sanitisation
Memory
Randomness
Time
Side channels
Privacy and anonymity
Trusted computing
Virtual environments
Public key infrastructure
0

2018/4/19 Read Practical Cryptography With Go | Leanpub
https://leanpub.com/gocrypto/read#leanpub-auto-select-bibliography 2/67
What cryptography does not provide
Data lifetimes
Options, knobs, and dials
Compatibility
Conclusion
Further reading
Chapter 3: Symmetric Security
Indistinguishability
Authenticity and integrity
NaCl
AES-GCM
AES-CTR with HMAC
AES-CBC
Messages v. streams
Conclusions
Further reading
Chapter 4: Secure Channels and Key Exchange
Secure channel
Password-based key derivation
Asymmetric key exchange: ECDH
NIST curves
Other key exchange methods
Practical: File encryptor
Further reading
Chapter 5: Digital signatures
Cryptographic hashing algorithms
Forward secrecy

2018/4/19 Read Practical Cryptography With Go | Leanpub
https://leanpub.com/gocrypto/read#leanpub-auto-select-bibliography 3/67
Chapter 1: Introduction
This is a book about cryptography: how to communicate
securely. There are several objectives that cryptography aims
to solve:
confidentiality
,
integrity
, and
authenticity
. It
also helps solve some other problems that come up in secure
communications, but it’s important to remember that it isn’t
a complete solution to security problems. In this book, we’ll
look at how to build secure systems; some of the problems that
cryptography does not solve will also be pointed out. This
book will attempt to guide you in your attempt to understand
how to use cryptography to secure your services, and
illustrate it using the Go programming language.
As mentioned, the foundation of cryptographic security are the
three goals of confidentiality, integrity, and authenticity.
Confidentiality is the requirement that only the intended
party can read a given message; integrity is the requirement
that a message’s contents cannot be tampered with; and
authenticity is the requirement that the
provenance
(or
origin) of a message can be trusted. Trust will play a large
Ed25519
ECDSA
RSA
Conclusions
Practical: Sessions with identities
Further reading
Appendix: Crypto Review of Chapters

2018/4/19 Read Practical Cryptography With Go | Leanpub
https://leanpub.com/gocrypto/read#leanpub-auto-select-bibliography 4/67
role in our secure systems, but there is no single solution to
the problem. It will present many challenges in building
secure systems. A cryptographic algorithm applies some
transformations to data in order to achieve these goals, and
various algorithms are applied to achieve different goals.
In order to discuss cryptography, a baseline vocabulary is
needed. The following terms have specific meanings:
The
plaintext
is the original message.
The
ciphertext
is traditionally a message that has been
transformed to provide confidentiality.
A
cipher
is a cryptographic transformation that is used to
encrypt or decrypt a message.
A
message authentication code
(or
MAC
) is a piece of data
that provides authenticity and integrity. A MAC algorithm
is used both to generate and validate this code.
To
encrypt
a message is to apply a confidentiality
transformation, but is often used to describe a
transformation that satisfies all three goals.
To
decrypt
a message to reverse the confidentiality
transformation, and often indicates that the other two
properties have been verified.
A
hash
or
digest algorithm
transforms some arbitrary
message into a fixed-size output, also called a digest or
hash. A cryptographic hash is such an algorithm that
satisfies some specific security goals.
A
peer
or
party
describes an entity involved in the
communication process. It might be a person or another
machine.

2018/4/19 Read Practical Cryptography With Go | Leanpub
https://leanpub.com/gocrypto/read#leanpub-auto-select-bibliography 5/67
A secure communication system will protect against both
passive
and
active
attacks. A passive attack is one in which
a party for whom a message is not intended is listening on the
communications. An active attack is one in which some
adversarial party is tampering with messages, and can inject,
alter, or replay messages.
Cryptography should be used to solve specific problems, such
as
Eavesdropping: as is the case with in-person
conversations, an attacker could listen in on traffic
going in and out, potentially stealing secrets passed back
and forth. The security goal of confidentiality will
mitigate this attack to an extent; while cryptography will
obscure the contents of the message, by itself it doesn’t
hide the fact that two parties are communicating. An
attacker might also be able to determine information based
on the size of the messages.
Tampering: traffic going in and out of the application
could be modified en-route; the system needs to make sure
that messages it receives have not been tampered with. The
integrity goal is used to ensure messages haven’t been
tampered with.
Spoofing: an attacker can pretend to be a legitimate user
by faking certain details of a message. An attacker can
use spoofing to steal sensitive information, forge
requests from a user, or take over a legitimate session.
Authentication helps to defend against this attack, by
validating the identity of users and messages.
剩余66页未读,继续阅读















安全验证
文档复制为VIP权益,开通VIP直接复制

评论3