Real World Crypto Notes
[ These are not all the talks as there are some I missed or decided not to take notes on. I’ll get to these soon and update this page. ]
Table of Contents:
- Message Franking: From Invisible Salamanders to Encryptment
- Catch Me If You Can: An Account Based End-to-end Encryption for Snapchat
- The Hill We Must Die On: Cryptographers and Congress
- Crypto Means Cryptography (But not for voting)
- Levchin Prize Announcement
- Noise Explorer: Fully automated modeling, analysis, and verification for arbitrary Noise protocols
- OPAQUE: Strong client-server password authentication for standardization
- How to (not) share a password
- Cryptography at DARPA
- State-level Secrets: When Theory Meets Practice for Journalists Working with Encrypted Documents
- Understanding Security Mistakes Developers Makes: Qualitative Analysis from Build It, Break It, Fix It
- Applying Proxy Re-encryption to Payments
- Managing Teams and Keys with Keybase
- Practicing the art and science of side channel and fault attacks
- Tink: a cryptographic library
- Lightning Talks!
- NIST PQC Round 2 Announcements
- Direct Anonymous Attestation in the Wild
- So how hard is solving LWE/NTRU anyway?
- An Account of the ISO/IEC Standardization of SIMON and SPECK
- FORESHADOW: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
- RISC-V: An Open Platform for Security R&D
- True2F: Backdoor-resistant authentication tokens
- Fast, Furious, and Insecure
- Towards an Open-Source, Formally-Verified Secure Processor
- Advanced Cryptography on the way to practice
- Deploying MPC For Social Good
- Towards Transparent Zero Knowledge Computation
- A Full Cryptocurrency Custody Solution Based on MPC and Threshold ECDSA
- A Tangled Curl: How we forged signatures in IOTA
- More coming soon!
Day 1
Message Franking: From Invisible Salamanders to Encryptment
Message franking is essentially a proof that a decryption of a ciphertext C is the plaintext M. A message franking scheme includes an encryption algorithm and a verification algorithm.
Facebook uses this for abuse reporting, however their scheme is very slow in comparison to authenticated encryption. Due to the efficiency problems, Facebook handles attachements differently.
To handle attachements, the user chooses a one-time file key and encrypts the attachment file with AES-GCM. They then use the Facebook franking algorithm on the key instead.
Problematically, GCM is not a secure franking scheme. Moreover, it’s not robust [ABN10], [FLQP13], [FOR17] – easy to construct a ciphertext that decrypts validly under different keys.
An attack is as follows:
- Construct a ciphertext C* which decrypts to innocuous attachement under K_1 and an abusive attachment under K_2.
- Attacker sends C* to victim twice, first with K_1 and then with K_2.
The outcome of the attack is that the user can report a message for abuse and Facebook will see an innocuous message while the user sees the abusive message.
Facebook Messenger source code refers to encrypted messages as salamanders. Thus, a disappearing message is an invisible salamander.
Catch Me If You Can: An Account Based End-to-end Encryption for Snapchat
Snaps have inherent privacy protections. They’re ephemeral – deleted after viewing, deleted in 30 days if not viewed.
Identity Churn: People lose identity between devices, applications, etc.
Snpchat had tried to use a double-ratchet like protocol, but it failed.
Requirements for a new scheme were: - Reduce identity churn - Securely support multiple users on a single device - Support multiple devices for a single user - Make retries faster
They introduced the notion of Account-based E2EE. Using a “post logout secure DB”, the user authenticates to the service and supplies a new public key (if any). This new public key is then very efficiently distributed accross the social graph for their friends.
On Snapchat, content is uploaded immediately upon creation, but it’s encrypted on the client side with a key CEK. When the user wants to share the content, only then is the key uploaded. If the user discards the content, then the key is never uploaded and snapchat never has access to the encrypted data.
Essentially, Snapchat uses their Account-based E2EE to wrap CEK to share among other devices. When the recipient logs in to a different device, and the sender is attempting to encrypt with a different device, Snapchat tells the sender to re-wrap the CEK with a different key.
Snapchat sends key updates via push notifications. To protect the public key they’re sending via push notification, they encrypt it with a key known only to the user’s device.
[This is interesting, but it doesn’t prevent any sort of nation state attacker, or rogue employee, from acting maliciously. Predominantly, the key exchange deployed over push notifications seems exceptionally problematic.]
The Hill We Must Die On: Cryptographers and Congress
Cryptography rearranges power: it configures who can do what, from what. This makes cryptography an inherently political tool. – Phillip Rogaway
Why work in policy?
- Governments struggle with complex systems
- Governments set trends
- Loudest voices on our issues not from our community
- Magnify impact
Authors worked in Ron Wyden’s office.
- Approx. 15 people in the office.
- Issue areas are “owned” by particular staffers.
- Staff identify problems and suggest actions.
- Problems are also sourced from constituents.
Some questions:
- What are the government’s “ground rules”?
- Can two people make a substantial impact?
- Is there overlap between academically interesting problems and policy interesting problems?
- How can we best represent our community?
The interests of the authors and the Senator somewhat overlapped, but they weren’t exactly the same.
What the authors did:
- Wrote letters, both angry and nice
- Drafted legislation
- ‘Cryptographic’ investigations
- Advised the Senator and senior staff
- Met with reps from various government agencies and private corps
- Argued about lots of things
The authors note that they argued a lot and felt that it was very productive.
They also met with members of NSA:
- Met Senior members and cryptographers
- One official commented that it was “refreshing” to have a direct conversation with members of the academic cryptographic community.
- Can’t disclose details
Cryptography is everywhere and seeing more adoption in government. For example, the Census will begin using differential privacy in 2020.
Authors note:
- Politics is performance. Hearings are for the public.
- Politicians do listen (or their staff do).
- It’s not hard to get one meeting.
- Ideas seeded today become law tomorrow.
Legislators want to hear stories. It’s hard to sell complex cryptography, instead use a story that may present why those concepts are preferable in comparison to the status quo. It’s also important to consider the politician’s mental model.
Don’t ignore “Incremental” problems. Big ticket issues are controversial and have friction. You can work incrementally to effect real change.
If you’re an academic:
- Embrace the moral nature of your work.
- Start telling your stories.
- Don’t shy away from taking a stance on something.
If you’re in industry:
- Reach beyond your particular company to bring together the industry.
- Start telling stories about how privacy actively helps your customers and can help constituents.
Crypto Means Cryptography (But not for Voting)
Interestingly, Matt Blaze notes that public confidence in election outcomes depends partly on public confidence in the mechanisms. These mechanisms have become very important (paper ballots, machine-counted ballots, voting computers, etc). We should think a lot on whether or not our voting tech actually accomplishes the requirements that we need for public confidence.
Some of these requirements contradict:
- Secrecy vs Transparency.
- Must not be able to discover someone’s vote, or prove how you voted.
- You want confidence that your vote was counted.
- No “do-overs”
- Elections must be certified by a certain date.
- Almost impossible to re-do an election, even if irregularities were detected.
- Mere detection of irregularities is insufficient.
Elections need recovery, not just proof that irregularities were detected. Does new voting tech enable mischief or does it prevent it?
Traditionally, the threat model was to prevent a corrupt candidate from influencing the election towards one way or another. In 2016, it became included that state actors could influence an election or reduce confidence in an election. These actors likely have resources that are greater than any other candidate or person. These malicious actors also only need to reduce confidence in who the winner (or loser) is.
Voting in the US:
- Highly distributed hierarchy:
- Federal government sets broad standards
- Each state has its own laws, rules, and requirements
- Elections run by counties.
- Voting takes place in neighborhood precincts
- Tens, hundreds, or thousands per county.
- Complex:
- Typical election has many races.
- Precinct may have several different ballots.
Matt notes that US voters vote for more issues per-election than any democracy on Earth. We may have 20-30 issues on each ballot. There can even be multiple ballots within ballots. Logistically, this becomes complex so the solution to “not use computers” just isn’t valid anymore.
With hole-punched ballots, if more people show up than expected, it becomes more difficult to vote. This is because the cardboard “hole” on the ballot fills up a reservoir and it physically becomes harder to vote. If a cardboard piece partially tears, it also becomes difficult for the optical reader to read the ballot, but easy for a human to notice.
The Help America Vote Act (HAVA) was a federal law passed after 2000 election. It mandated that states shift to accessible voting technology.
The most prominent machine that was HAVA Compliant was a DRE Voting Machine. It reads votes directly into memory from a touchscreen.
This is computerized voting. This is problematic because software is also problematic. There is a lot of room for failure and compromise. It’s also inherently complex and easy to hide malicious bugs.
It’s used at basically all stages of elections (pre, during, and post).
There are many potential vulnerabilities with computerized voting and cryptography doesn’t help with most of these problems. Especially when we consider recovery from some of these vulnerabilities.
There are four major vendors of voting equipment and all of them have had serious questions raised about the integrity of the voting system.
In theory, voting sounds simple, but in practice it’s actually very complex and encompasses many phases of an election.
Matt audited a voting system at UPenn and found that all they needed was physical access (a voter, poll worker) to alter election results.
The solution is not to build better software, but conduct more audits and procedural controls. In the long term, we need careful design for security and better architectural models that don’t make us dependent on problematic platforms. New innovative cryptography is not so important for these answers. Essentially, don’t build systems that rely on software.
But what about the blockchain:
- Sounds perfect, but…
- Heavily dependent on software integrity of client.
- There are serious ballot secrecy issues.
- Addresses tamper detection, but doesn’t prevent it or aid in recovery.
- Just stop.
Blockchains just don’t solve the issues inherent in voting problems.
Want to learn more?
- National Academies voting study
- Volunteer as a poll worker.
Questions/Notes:
- How do you counteract vendors making more complex “but better” revisions to their systems?
- Elections are very quick deadlines. Solutions that don’t address this aren’t viable.
- There is a bipartisan consensus that this is an issue. Previously, it was more partisan.
- Equipment purchased under HAVA are reaching the end of their lifetimes.
- Get involved with the legislative process to end this.
- Most mischief happens at the local level.
- It’s very plausible that an adversary could cause widescale disruption.
- This hasn’t happened yet because no one is trying.
- CIA interferes in elections, just not US elections.
Levchin Prize
- Amazing, Epilepsy triggering light show from Dan Boneh’s computer.
- Winners are:
- Mihir Bellare
- The design and analysis of cryptosystems including:
- Random Oracle Model
- Modes of operation
- HMAC
- Models for key exchange
- The design and analysis of cryptosystems including:
- Eric Rescorla
- Sustained contributions to the standardization of security protocols, and most recently the development and standardization of TLS 1.3
- Mihir Bellare
Noise Explorer: Fully automated modeling, analysis, and verification for arbitrary Noise protocols
Noise is a framework for Secure Channel Protocols based on Diffie-Hellman key agreement.
[See Trevor Perrin’s RWC2018 talk on Noise]
Noise Handshake Pattern Notation:
s, e
: local static and ephemeral key pairs. Automatically generated when they appear in a message.ss, se, es, ee
: Diffie-Hellman operations. Automatically mixed into state.- Once we have shared secret agreement, encryption kicks in automatically.
Noise is adopted by popular products like WhatsApp and WireGuard.
Security goals in Noise are based on a Grade System.
- Authentication: 0, 1, 2
- Confidentiality: 0, 1, 2, 3, 4, 5
- Identity Hiding
- Not currently evaluated by Noise Explorer
There are 50+ handshake patterns in the spec alone.
Noise allows for use-case specific protocols.
Noise Explorer allows for designing and formally verifying any noise handshake pattern. Nadim has made a compendium for the results for 50+ noise handshake patterns. Noise Explorer also generates full implementations for your noise handshake pattern in JS and Go.
What is Formal Verification with ProVerif?
- Beating the “code first, specify later” methodology.
- Two main models:
- Symbolic model
- Computation model
- We use the symbolic model, where we can model protocol flows and try to find contradictions to security queries.
- Formally verified using ProVerif
In ProVerif all cryptographic primitives are perfect symbolic black-boxes with no algebraic properties. Using ProVeriff, they were able to make contributions to the Noise specification to imporove security. They also added security grades for 23 different patterns.
Noise Vs TLS:
- BoringSSL has ~250k lines of code.
- BearSSL has ~25K lines of code.
- Noise has ~4k lines of code.
Noise protocols have less room for error and are easier to audit in comparison. It takes less trust to build these protocols.
The Noise Explorer really is very complete and articulate. Definitely check it out.
Future of Noise:
- Small, Use-case specfic Protocols
- Entire library is ~1K lines of code, specific handshake patterns can be smaller. (See David Wong’s post)
- Much smaller and more use-case specific state machine than TLS or similar.
- Signatures are coming!
See https://eprint.iacr.org/2018/766
Application Layer Transport Security
Distributed systems rely on secure communication protocols. Google uses Application Layer Transport Security (ALTS) to secure Remote Procedure Calls (RPCs). Google sees roughly 10 billion RPCs per second.
Why not TLS?
- ALTS dev began in 2007
- TLS didn’t fit Google’s security model at the time
- TLS and its implementations seemed complex, due to support for legacy flow and protocols
- TLS could be modified and adopted, therefore, developing from scratch seemed more advantageous
- TLS and ALTS have fundamentally different trust models
- ALTS is simpler in its design and implementation
- ALTS semed more suitable in a production network
ALTS was designed to be a highly reliable, trusted system.
Some guiding principles:
- Transparency
- Identities have corresponding “managed” credentials
- Deployed and periodically refreshed automatically for each workload without application developer involvement.
- State-of-the-art Cryptography
- AES-GCM with auto-rekeying
- Google controls ALTS: protocols are easily upgradeable and deployed
- Identity Model
- Authentication by identity rather than host name
ALTS Trust Model:
- Authenticate identities, not hosts.
- Every network entity has an associated identity
- embedded in certificates
- used for peer authentication
Three types of credentials expressed in ProtoBuffs: master certs, handshaker certs, and resumption keys.
[Speaker is moving exceptionally quick for a very complex protocol, and I can’t notate quickly enough. Fairly interesting infrastructure, though. Google published a whitepaper with more details. See https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security/ ]
OPAQUE: Strong client-server password authentication for standardization
Passwords, can’t live with them, can’t live without them. – Cyberius Erasmus
Hugo notes that passwords will not disappear.
Unavoidable attacks of using passwords:
- Online guessing
- Mitigation: throttling, second factor
- Offline dictionary search: Upon server compromise
- Mitigation: Salting
- Make sure exhaustive attack starts after the compromise happens (no pre-computed dictionaries)
Avoidable attacks:
- Password visible at the server, upon TLS decryption
- In transit (PKI failures)
- TLS failures
- By design (middle boxes)
- Phishing: exploits visibility of password at server
aPAKE
- aPAKE: Asymmetric Password Authenticated Key Exchange (a also for augmented)
- Asymmetric in Client-Server setting
- User has a password, server has a one-way mapping of password
- Contrast with symmetric case where both peers store the same password
- No pre-computation attacks
OPAQUE:
- First aPAKE secure against pre-computation attacks:
- All other aPAKE protocols don’t use salt or transmit it in the clear!
- Targeted dictionaries
- True even for proven protocols (weak model)
- SPAKE2+, AugPAKE, SRP, etc (no proof, even in weak model)
- All other aPAKE protocols don’t use salt or transmit it in the clear!
- PKI Free (user only remember password)
- Password never in the clear outside client domain (not even at registration)
- In particular, foils phishing
The OPAQUE Protocol:
- Uses an Oblivious PRF (OPRF)
- Keyed function indistinguishable from a random function for anyone who doesn’t have a key.
OPAQUE basics from [FK’00, Boyen’09 (HPAKE), JKKX’16].
- User runs OPRF with server by which it “exchanges” its password for the OPRF output
- Server (or anyone else) learns nothing about the password and OPRF output.
- User uses OPRF output as a private key in a key exchange.
OPAQUE can be thought of as a “compiler” from any OPRF and key exchange to aPAKE.
Diffie-Hellman OPRF is the most efficient OPRF.
OPAQUE also blends smoothly with 3-flight TLS1.3 handshake. The server certs and client signature can be replaced with OPAQUE’s components. To add account confidentiality, it adds a round trip w/ account info protected by a server-authenticated 1-RTT (with server’s certs).
OPAQUE Security:
- Proven secure against pre-computation attacks
- OPRF key acts as a “secret salt”
- Proof (UC model):
- Strong aPAKE model (PKI-free and disallows pre-computation attacks)
- Proof of OPAQUE is generic: OPRF + KE (w/ KCL) + Key-robust AENC
- With H-OPRF: In ROM under Gap One-More Diffie-Hellmand
- Forward Security (crucial if password eventually leaks)
- User-side hash iterations (e.g: PBKDF2, argon2, Scrypt)
- Security against pre-computation attacks
Extenstions:
- Credential Retrieval
- Multi-server implementation
- Threshold OPRF
- Attacker needs to break into a threshold number of servers
- Even then, it can only mount a dictionary attack
- User/client transparent: user need not be aware of the distributed implementation (communicates via gateway)
Summary:
- Modular/Flexible: Can compose with any Authenticated KE (w/ KCL)
- Efficient Instantiations (HMQV, SIGMA, TLS1.3
- Smooth integration w/ TLS
- Much stronger than password over TLS
- Hedging against PKI failures
- Proof in strong UC security model
- Client-side hardening
- Forward Secure
- No reliance on PKI
- OPAQUE is very strong candidate to standardize.
See https://bit.ly/OPAQUE-paper, https://bit.ly/OPAQUE-draft, https://bit.ly/SPHINX-paper (password manager to complement OPAQUE)
How to (not) share a password
Passwords:
- First “modern” use in MIT’s CTSs (1961)
- “Passwords are dead”?
- Definitely not dead yet.
- Users tend to choose really bad password w/ low-entropy
Bad passwords don’t only compromise the users. Weak and popular passwords can be used for large-scale attacks. Some examples are the Mirai attack and easy to find IoT devices with Shodan-like search engines. Unique weak passwords might be okay, but popular passwords are bad. There exists also a question of whose fault is it. California made the “Security of Connected Devices” law in October 2018 to answer some of this.
It’s very difficult to decide “ideal” guidelines for password. NIST basically said to choose the longest password the user remembers.
Some possible solutions:
- Two-factor authentication
- Not used so much in practice, unfortunately.
- Server saves a list of all users’ passwords and blacklists the popular passwords.
- Bad solution, puts users’ passwords at risk: new single point of failure
- Blacklisting known passwords
- Also a bad solution
Passwords over time change but changes aren’t strong enough and tend to go back to simple ones like the original.
It’s noted that publishing blacklists can also help attackers. An attacker can use auxiliary data to guess password distribution. It’s noted that publishing a blacklist is similar to a code vulnerability. Leaking password info can also hurt the user.
Ideally, we want to identify and blacklist popular passwords. However, servers should not learn “more than 1 bit” on any user’s password. This halves (at most) the number of password guesses.
Authors note that there exists lots of prior research, but says that theirs is a bit different. Both users and servers may be malicious.
MPC Meets DP in the Malicious World:
- Security Requirements in the protocol are asymmetric.
- Relatively easy to protect users’ privacy from server
- Harder to protect against colluding malicious users.
- E.g. how can we prevent cheating in randomized response?
[Again, speaker is moving quickly and I’m having trouble keeping up.]
See https://eprint.iacr.org/2018/003/
Cryptography at DARPA
Overview:
- Proceeed - Computation on Encrypted Data
- FHE, MPC
- SAFER - Safe, Resilient Commms over the internet
- Pluggable Transports, Decoy Routing, Three-Party MPC
- Brandeis - Building Privacy Aware Systems
- MPC, Differential Privacy,
- RACE
- Couldn’t complete this list
Braneis’ goal is to develop tools and techniques that allow applications to use private date for only their intended purpose. Essentially, the aim is to decrease trust in applications that require private information.
An example was given with how some folks didn’t use Signal because it wanted their contacts list, but it needed it for innocuous purposes.
Brandeis attempts to measure privacy which is fairly complicated, among other things.
One development is “Privacy-Enhanced (PE) Android”. PE Android seems like a system that is very similar to SELinux but for privacy controls.
Author notes that he belives MPC is completely practical for some applications. Brandeis uses MPC in some ways to preserve privacy. An example is given for something called a “Help Me” application that uses encryption to route users to a near by medical aid center.
Another example is given for “Optimized Schedule Docking”. Brandeis is accomplishing this in a practical time (7s) utilizing MPC.
Some tech supported w/ Brandeis:
- Cryptography
- SCALE-MAMBA
- Garbled RAM
- Oblivious RAM
- SGX/Sanctum
- Functional Secret Sharing
- Differential Privacy
- Workload Balancing
- Composition (Ektelo)
- Local DP
- Open-source tools (uber’s sql-differental project)
Race’s goal is to use cryptogaphy and obfuscated communications to build an anonymous, attack resilient, mobile communication system that can reside completely within a contested network environment.
Author notes strong security properties and offers confidentiality, Integrity, and Availability.
Future Cryptography at DARPA:
- Zero Knowledge
- What can/should I prove in ZK?
- How efficiently can I prove it?
- Proof and statement/witness efficiency
- What are the big theoretical “heavy lifts” that need to be addressed?
- PCPs, Interact Proof Complexity, etc
- Consensus Protocols
- What can we actually do now that we can’t do before?
- Permissioned blockhains = old news (YES!)
- Permissionless blockchains- ?
- Economic understandings of security + Distributed Computation Protocols = ?
- How secure are consensus protocols really?
- Are distributed systems truly decentralized?
- What can we actually do now that we can’t do before?
Interesting question – someone pointed out that there is an ethical question with regards to accepting funding from military sources, like DARPA and quoted Phillip Rogaway.
State-level Secrets: When Theory Meets Practice for Journalists Working with Encrypted Documents
We’re specifically examining Threshold schemes and their applications to journalism.
In a threshold scheme, each participant is given a fragment of a secret and cannot, alone, recover information from the secret.
In our scenario, a journalist wants to securely store information in a manner that has some redundency. This can be accomplished in a threshold setting to securely share this information to eliminate that single point of failure. It also prevents a single person from unilaterally deciding to share information.
The Freedom of the Press Foundation created Sunder which allows for people to use Shamir’s Secret Sharing to accomplish the threshold setting.
There are three stages of this scheme:
- Fragment Generations
- Distribution
- Reconstruction
Authors are focusing on the security of these systems, including the “ceremony” and the people interacting with the system. This includes how a human interacts with the protocol. We will examine the gaps in these protocols and how it affects security, and the improvements identified.
Gaps and Improvements: Base
- Share loss
- Loss of
n - t -1
shares renders the secret irrecoverable - Improvement:
- There is a repair algorithm that can allow the secret to be reconstructed.
- Usable on Shamir’s scheme.
- There is a repair algorithm that can allow the secret to be reconstructed.
- Loss of
Organizational Turnover
- Shamir’s scheme doesn’t protect against this.
- This occurs when someone moves from a trusted to untrusted state.
- Improvement:
- Allow for dynamic updates within the shares.
- Remaining number of people can perform updates to the shares
- Upcoming paper has more details on this and an implementation (follow-up)
- Allow for dynamic updates within the shares.
Integrity for Ciphertext:
- It’s not defined how you verify the integrity of an n-ciphertext.
Redundency for ciphertexts:
- If you can retain a threshold number of shares, you can continue to recover the secret.
- In Sunder, there is no mention of redundency.
- Improvements:
- Copy ciphertexts to several different, trusted servers that are also independently located.
Ongoing and Future Work:
Current:
- Complete ceremony analysis
- Updating Shares functionality
Future:
- Adding imeplementations of repairing algorithms for lost shares.
- Designing schemes to limit dealer trust.
Takeaways:
- Secret sharing schemes are not suitable for real world use as is.
- Actionable improvements for gaps found in integrity, confidentiality, authenticity, and availability.
- Ceremony analysis identifies gaps between user responsibility and security expectations.
Post talk notes:
- Ensuring secure deletion is hard to assure. Authors had to assume the secure deletion of a share or ciphertext.
Understanding Security Mistakes Developers Makes: Qualitative Analysis from Build It, Break It, Fix It
Many real vulnerabilities arise from “solved” problems
- Buffer Overflows
- SQL injection
- Bad randomness
- Static Keys
A graph notes that buffer overflows have become more prominent, especially in 2018.
There are many examples of vulnerabilities that are quite obvious today. Even Ransomware developers get crypto wrong. Sony, yet again, gets hardware and embedded cryptography wrong leading to playstation classic hacking (thank you!!)
It’s easy to laugh at these mistakes, but we need to change our minds on this. Instead of asking, “What’s wrong with devs?” we should ask, “What can we do to make secure programming easier?”
Some solutions:
- Better languages
- Better APIs
- Better documentation
- More education
We need to understand causes and prevalence of vulnerabiltities. This is hard.
We can accomplish this with:
- Field Studies
- Hard to do.
- Organizations aren’t thrilled about letting researchers in to do this.
- Field Measurements
- Look at CVEs
- Examine what vulnerabilties exist over some years
- Reading new research
- This can be difficult because you tend to find bugs you’re looking for
- Lab studies
- Lots of control
- Much easier to manage and examine
- Has some drawbacks due to programming in a lab setting is different from practice.
Build it, Break it, Fix it
- Secure development contest
- Build to spec
- Then break other teams
- Incentive design is important
Builders:
- Make it performant
- Make it secure
Breaker:
- Prefer security to correctness
- Attack a breadth of submissions
- Incentivized to find unique vulnerabilities
Findings:
- More control than field studies
- More realism than lab studies
- Result: Rich data about vulnerability introduction
Problems asked to solve:
Secure Log Problem
- Keep tracking of people going into a gallery
- Rquires a key to access the log
- Bad guys get access to the log, but not the key.
Secure Communications Problem
- Modeled after a bank talking to an ATM
- Can create cards, withdraw money, etc
- Bad guys can create packets, drop packets, access storage
Secure Data Server Problem
- Essentially a key-value store
- Delegate access to it
Analysis Approach
- Examine each project and each vulnerability in detail
- Breaker identified and researcher-identified
- Iterative open and axial coding
- Towo indepenedent coders; high reliability
- 76 projects, more than 800 vulnerabilities
- Qual and quant analysis on resulting categories
Measuring:
- Vulnerability type
- Severity
- Chained
- Discovery Difficulty
- Exploit difficulty
Hierarchy of vulnerability classes
- No implementation
- Failed to implement important security feature
- Misunderstanding
- Attempted to implement security feature but misunderstood how it worked
- Mistakes
- Just an implementation error in a security feature
Author notes that the analysis is taking longer than expected and is not complete yet.
Non-attempts >> mistakes Misunderstandings >> mistakes Implicit non-attempts occur more than obvious non-attempts.
Comparing problems:
- Mistakes most common for secure server, then ATM (problem complexity)
- Implicit issues, concept errors in the ATM problem (lots of unstated requirements, lots of moving parts)
- Bad choices in the secure log problem
- No explanation for this
Vulnerability classes:
Non attempt:
- Obvious
- No encryption (log, ATM)
- No access control (server)
- Implicit
- Side channels
- No MAC
- No nonce
- No checking delegation chain (server)
Misunderstanding:
- Weak encryption algo (e.g. WEP)
- Unkeyed function
- Use of
strcpy
- Misuse of library
- Access control lib can’t handle loops in delegation list.
- Used SQLCipher but turned off automated MAC
- Team explicity turned off MAC
- Seems that they got a weird error message trying to make it work
- Decided to turn it off to make it work
- Team explicity turned off MAC
- Fixed keys instead of randomness
- Literally copied from documentation and Stack Overflow
- Documentation didn’t say to not do this.
- Literally copied from documentation and Stack Overflow
- Insufficient randomness
- Nonce overflow
- IV counts up
- Nonce timestamp window too large
Mistake:
- Bad
NOT
in nested conditionals - Uncaught exception on replay
- Ignore error from wrong nonce
- Null pointer issues
Thinking about solutions:
- Improve abstraction levels in APIs
- Semantic primitives
- Improve documentation
- Clarify what you can(not) copy/paste
- No mysterious error messages
- Tools and automation
- Wizards, API misuse detection, semantic analysis
More analysis coming soon:
- Relating features to vulnerability types and quantities
- Modularity
- Quality of comments
- language used
- Factors related to likelihood of vulnerability being found
- Insight into contest incentives/improvements
Understanding developer errors is hard. Vulnerabilties arise from nuanced security properties. Abstractions and documentation matter (and not just in lab studies).
An invitiation to join the participant panel – https://ter.ps/SecPros/
Author notes that Education, Programming experience, and security experience don’t really help that much against creating bugs. Author also notes that code with test coverage statistics aren’t available yet, but are coming soon.
Day 2
Applying Proxy Re-encryption to Payments
A Merchant bank and a Consumer bank are connected via a payment network.
Some sample transactions on this network are:
- Card Verification
- Authorization Request Cryptogram
- Pin Verification
Visa does 5000 messages/second worth roughly about 2 billion dollars.
HSMs are connected at all points througout the network.
There are two pin verification modes:
- Online
- Bank can verify the pin
- Offline
- More risky, but the PoS can hold the pin until it can be verified online.
Key Custodians can share keys with the bank to re-encrypt and perform a pin transformation. These keys are held by the Payment Gateway and the Payment Network. This creates a chain of custody wherein each actor encrypts, then decrypts, then encrypts again the pin to keep it confidential on the network.
This is error prone.
Requirements:
- Support for all payment types (chip/pin, magstripe, etc)
- Reduce HSM reliance
- Incur minimal changes to the ecosystem
Solutions:
- Simple PKI solution
- The PoS has to store a large map of keys to banks
- This is infeasible in practice
- Inflexible Routing
- The PoS has to store a large map of keys to banks
- Store pubkey on card
- No PKI on mag-strip
- Very inflexible for payment type
- Increases cost of personalization for the bank
- Proxy Re-encryption
- Can re-encrypt information from Alice to Bob without decryption using a re-encryption key
- Uni- or Bi-directional?
- Collusion safe?
- Non-Interactive
- Non-transitive
Instead of encrypting, decrypting, then encrypting repeatedly, these network actors would perform a re-encrypt function.
Important properties in PRE for Visa
- Needs to be Transitive
- Needs to be non-interactive
- BBS98 is interactive, thus it needs to be adapted a bit.
Key setup:
- Merchant bank and Payment Network is considered a trusted network.
- The Merchant Bank can share the public key to the PoS partner and store its re-encryption key
- The payment network also stores some re-encryption key and shares a pubkey with the consumer bank.
- PoS encrypts pin normally
- Payment Gateway performs re-encryption on Pin to merchant bank
- Payment network performs a re-encryption to consumer bank
- These require no HSM and transactions are performed more efficiently.
Benchmarks:
- Latency
- Very negligible, encryption is most latent.
Solution Summary:
- Supports all payment types (chip/mag-stripe, token-based, etc)
- Reduced HSM reliance during online phase
- Incurs minimal change on the Domestic Card Processing Network
Problem: Cart Abandonments:
People abandon their carts online because:
- Site wanted to create an account
- Don’t trust site with card info
- Not enough payment methods
How can we help merchants accept unknown payment types?
Visa Blockchain shilling commences w/ PRE + SGX + Blockchain
Conclusion:
- PRE reduces HSM burden
[ I am very concerned with how they use BBS98 for this… They spent very little time explaining their trust model and given the key setup for BBS98, this is concerning. ]
Managing Teams and Keys with Keybase
Too many people are uploading unencrypted data to centralized servers.
- Federated management was better than what we have today, but was never good enough.
- Managed apps in the cloud: maybe that ship has sailed?
- Managed apps are the foreseeable future
- But at the very least, can we decentralize trust and key management?
How do we build an end-to-end encrypted slack?
Basic Requirements:
- Multi-device support
- Get new phone for christmas, enter username/password, and get instant access to all history
- Nameable teams with mutable membership
- Authenticated Invitation of new members
Slack is currently very centrally managed. It basically trusts on email authentication.
Threat model:
- Bad guys own any server infrastructure
- This is a very fair assumption
- Forward-secrecy is opt-in per-message and can be layered on top (outside scope)
There are a few insufficient solutions:
- Can’t store a master key in a vault
- Things like PGP just isn’t practical
- Yubikeys aren’t great
- Keys can be lost
- Master device powering other devices
- Capable for more layers of security in comparison to other approaches
Keybase’s approach:
- Users think about devices not keys
- Each device in a user’s cloud is equally powerful. Why?
- We’ve all lost laptops, phones, paper, etc
- The more devices, the less likely you are to lose data
- You’re most likely to discard your oldest device
- Reuse this abstraction for teams
- Devices are to Users as Users are to Teams
How apps work:
- Every team has a random shared symm key that rotates when:
- Users are removed from team
- Any team member revokes a device
- All updates to the chat channel (or git repo/file system) are:
- Encrypted for current shared team symmetric key
- Signed by the user that made the update
Questions:
- How devices sign statements to constitute a user?
- How users sign statements to constitute a team?
Account Creations:
- Pick username
n
- Rolls a new Ed25519 Signing Keypair
(s,S)
- Rolls a new Curve25519 DH Keypair
(d,D)
- Rolls a new “per-user-key” Curve25519 DH Keypair
(u,U)
- Signs
D
withs
- Encrypts
u
forD
- Crucially,
s
andd
never leave the device; encryption ofu
does
- Crucially,
- Posts sigchain links to a global merkle tree.
New device addition:
- New Ed25519 Key
(s',S')
- New Curve25519 key
(d', D')
- Signs
S
withs'
andS'
withs
- Signs
D
withd'
andd'
withd
- couldn’t complete this list
Keybase uses a QR code to transmit keys between devices. Secrecy isn’t needed here, just authenticity.
Revoking a device:
- Sign a statement to revoke
S
andD
from lost/stolen/retired device - Rotate per-user-key to
(u',U')
and re-encryptsu'
for all non-revoked devices
A link is added to the global merkle tree to show that a key was revoked.
Proving External Corroboration
- Alice posts a signature saying she is @someone on Twitter
- Then posts a hash of that signature to Twitter
To find Alice, Bob:
- Descends Merkle tree to Alice’s leaf
- Fetch tail of her “sigchain”
- Playback chain from beginning to compute:
- Signing keys
- DH keys
- Per-user keys
- Claimed external identities (Twitter, HN, etc)
How to define a team?
- Alice creates the team “Coinco” with two admins, her and Bob
- Rolls a new Team secret t
- from t, generates team pub keys
- Signing
- DH
- and a symmetric key for encrypted shared team data
- Encrypts t for all herself and Bob
- Then appended to the sigchain for “Coinco”
Adding a user to a team:
- Alice or Bob can now add Chuck to the team
- Admins can make membership changes
- Non-admins just get to see team secrets
- Adds a sighchain link
- Encrypts t for new user Chuck
Removing a user:
- Admins can remove users, but must re-roll the team keys
- Sigchain is appended with the removal and new keys
Revoing a device, revisisted:
- Whenever team members revoke devices, their per-user-keys re-roll
- Therefore all teams they are in must re-roll their keys
- This can be done lazily, just before the next time someone chats, or writes a file for the team
What was learned using per-user-keys:
- v1 was built without
- Alice’s mobile provisions a new laptop
- For all teams Alice is in:
- Reencrypt team secret for laptop
- For all teams Alice is in:
- Rekey races Alice backgrounding the app
- Can result in viral data loss across devices
Details and other lessons learned:
- Root of Merkle Tree gets posted to Bitcoin blockchain periodically to prevent “forking attacks”
- Ephemeral messaging easily scaling up to a 2k user team
- Users still need education on key management
Conclusion:
- Key problem: Multi-device with instant access on new device
- Solution: per-user-keys
- Users are chains of device additions/removals
- All devices are equally powerful
- Teams are chains of users additions/removals
- All admins are equally powerful
- From there, build a shared secret key for teams that rotates on revocation or member removal
Practicing the art and science of side channel and fault attacks
Sometimes there is leakage on devices and we can examine it.
When doing fault attacks, we’re trying to make the device misbehave in some way. We’re simply trying to make it perform some computation fault.
Today, we can examine this leakage via:
- Signal processing
- Very much so like an art, requires intuition and experience.
Some methods:
- DPA
- TVLA
- DFA
- FI success %
The process from Riscure to certify a device can take 2 week to 2 months for a single algorithm.
Power analysis process:
- Get a signal
- Signal processing
- Leakage modeling (if it’s leaky enough)
On Signal Processing:
- Not really defined up front how to use it
- Takes a lot of intuition and experience to attempt this
- Signal Misalignment
- Can be caused by bad device clock, among other things
- Points of Interest Selection
- When are interesting points (like cryptography) occurring during the signal
- Among noise and misalignment, you must find these points
- There is a statistical dependency between intermediate (key-related) data and power consumption
- EM leakage location finding
- Using heatmaps, we can identify on the chip where the most leakage is happening.
- Maybe it occurs on a specific part of a chip (like a crypto processor)
Open Research Questions:
- How to find good EM spots without doing T-testing on each spot?
- How to automate the combined problem of filtering, alignment, etc?
Fault Injection:
- Using devices to create a fault on a device
- 90-95% of times, we’re not attacking crypto.
- Mostly attacking things like JTAG or secure boot
- If you can compromise it at this stage, you can compromise it in the future.
- You effectively own the device.
- Mostly attacking things like JTAG or secure boot
- This takes a lot of experience in figuring out how to get this to happen on a device
More open Research questions:
- What exactly happens to a circuit when faulted, to inform countermeasures?
- More software scalable FI attacks, a la CLKscrew?
- CLKscrew was able to overclock CPU for a short amount of time to cause a fault
- Being able to trigger a fault through software is far more scalable instead of having to use things like EM-pulses.
TVLA (T-testing):
- Supposed we have an AES implementation
- Send specially crafted input vectors
- Using the given input vectors, and some random ones, we can attempt to identify some leakage by comparing the differences in the signals.
- Very useful tool for profiling and seeing where things are leaking and how much
More open research questions:
- How exploitable are T-spikes in practice?
- Requires some leakage model to practically find an exploit.
- Sometimes leakage occurs in different parts of an algorithm, but makes it unexploitable.
DPA key recovery:
- CPA is more performant than DPA
- DPA works, but we keep falling back to CPA
More open research questions:
- So far, it’s hard to beat CPA in terms of efficiency (couldn’t complete the question)
- We rarely perform Differential Fault Analysis. If we can exploit JTAG or boot, how can we more effectively secure this?
Cerification:
- Goal is to have objective pass/fail criteria
- Common criteria:
- Expertise, equipment used, time elapsed, samples used, information available, open samples
- (number of traces not dirrectly relevant, nor FI success %!)
- Not as objective as we make it sound
- What is an objective measure that can determine device security?
Improvements:
- We can deduce some info:
- Timing of leakage/fault
- Amount of leakage/faul success rate
- Type of leakage -Turning into countermeasures is nontrivial
- Game of whack-a-mole
More open research questions:
- How to automatically creat countermeasures based on test results?
- Results on FPGA/non-secure microcontroller do not translate to secure icrocontrollers or SoCs. More results on the latter are needed.
Current research - Deep learning for SCA:
- Before, we’re doing leakage modeling and signal analysis
- Current research is using a neural network to find and identify signals
- Results are hopeful
- AES was broken with First-Order Masking using this neural network
- Countermeasure: Rotated S-Box masking
- CPA has not been able to find this form of leakage.
- Also tested on misaligned traces
On S-box Masking:
- Masking is expensive in performance and memory
- Roting mask helps by pre-computing masked S-boxes
Author notes we rarely perform 2nd order attacks, because sample combing is infeasible due to noise and limited time. How do we find these efficiently?
Conclusions on Deep Learning:
- DL can exploit and identify leakage
- DL does SCA art + science and scales well
- Hardware crypto still presents challenges
- Also still requires humans for fine tuning
Active research:
- Machine learning for SCA
- FI outside of lab conditions/larger distance
- Design time analysis:
- SCA on simulator
- FI on simulator
Conclusion:
- Automation is needed for scaling hardware anylsis
- Many interesting research is available
- Riscure is looking to collaborate on this
Tink: a cryptographic library
Motivation:
- Cryptography is useful
- Often difficult to use
- Complex APIs need in-depth expterise to be used safely
- Focus of non-crypto developers is usually not on crypto
- Simple mistakes can have serious consequences
On complex APIs:
- OpenSSL
- Very complex APIs
- Not very obvious how to use.
- Must have a crypto background to understand some topics
- Crypto API NG
- Many parameters
- some obvious, some not
- Many parameters
- Java JCE
- Nicer API, but still complex
- A crypto background is still needed to understand many parts of the API
On ambiguous yet inextensible APIs:
- C++ Keyczar:
- A single object can do “everything” (encryption/decryption, signing/verifying, etc)
- Still not enough for usability
- Not as extensible as it could be
- A single object can do “everything” (encryption/decryption, signing/verifying, etc)
- Java Keyczar:
- One encrypter for all encryption
- Mixes public-key encryption and numerous flavors of symmetric encryption
- Bound to a global
KeyPurpose
-enum- Leads to incompatibility between various systems
Outline:
- Tink design goals
- User’s perspective
- Tink core
- Key management
- Readability and Auditability
- Extensibility
- Current status and future plans
Design goals:
- Security
- Hard-to-misuse API
- Reuse of proven and well-tested libraries (project Wycheproof)
- Usability
- Simple and easy-to-use API
- Don’t want to study pages of docs, nor have a crypto background
- Devs should focus on application, not crypto security
- User can focus on the desired functionality
- Simple and easy-to-use API
- Readability and Auditability
- Functionality “visible” in code
- Control over employed cryptographic schemes
- Extensibility
- Easy to add new functionalities, schemes, formats
- Support for local customizations
- Agility
- Built in key-rotation
- Support for deprecation of obsolete/broken schemes
- Interoperability
- Available in many languages and on many platforms
- Integration with external services (e.g KMS)
User Perspective - Primitives:
- Primitive - an abstract representation of a crypto functionality
- Defines functionality in a form of an interface
- Not bound to any specific implementation or a global enum
Examples of primitives: - Message Authentication Code (MAC) - Authenticated Encryption with Associated Data (AEAD) - Streaming AEAD
Primitives in Action:
- Generate key material via
KeysetHandle
- Templates are possible.
- Keys for AES-GCM, for example
- Templates are possible.
- Get the primitive
- Like an AEAD, or Streaming AEAD
- Use the primitive to encrypt a plaintext
- Output is simply an array of bytes
Tink Core - keys:
- Key - a container for cryptographic key material and params
- Identified by a string: ‘key type’ (a.k.a ‘type url’ e.g -
type.googleapis.com/google.crypto.tink.AesGcmKey
- Implemented as a protocol buffer:
- Identified by a string: ‘key type’ (a.k.a ‘type url’ e.g -
- Key managers:
- Key Manager - a manager for keys of a specific key type
- “Knows” which primitive corresponds to the key type
- Key Manager - a manager for keys of a specific key type
- Key types and key managers are 1-to-1 with their corresponding primitives (AES-GCM, AES-EAX, AES-CTR-HMAC, etc)
- Keyset - A collection of keys
- All keys ina keyset correspond to a single primitive
- Primary tool for key rotation
- Keyset Handle - a wrapper around a keyset
- Registry - a container for key managers used by an application
- A mapping from key type to a key manager object
- Initialized at startup
- The foundation of obtaining primitives
Key Management features: - Key Rotation - via Keysets - A distinguished primary key for creation of crypto data (ciphertexts, signatures, etc) - Matching of crypto data with a suitable key in a keyset - Disabling of obsolete keys - Uniform handling of external keys (KMS, HSM, etc) - “Key” in a keyset contains only a reference to KMS - A keyset can contain both external and regular keys - Gradual deprecation of cryptographic schemes - Can forbid creation of new keys of deprecated schemes
Readability and Auditability:
- Implementations of Primitives guarantee properties
- Registry and Configs:
- Full control over primitives and their implementations
- Stats about usage of cryptographic schemes
- Maybe it’s using new crypto, but you want to see how important the old scheme is to the system?
- Coming soon ™
Extensibility:
- Custom key types and implementation of Tink primitives
- Definition and implementation of custom primitives
- Registry, keysets, key rotation, etc all work as with standard components
- Custom implementation of AEAD
- Define custom key type (e.g -
type.googleapis.com/my.org.MyCustomKey
- Implement key manager for the custom key type
- Not that difficult, but a few methods to do
- Register the custom key manager
- Now you can use it as any other implementation of AEAD
- Define custom key type (e.g -
- Custom primitives
- Define the interface of the custom primitive
- Implement a primitive wrapper and register it
- Implement key manager(s) and use them as Tink primitives
- Can use as a standard primitive now!
Current status and Future plans:
- Tink is open source
- Supported primitives:
- MACs
- AEADs
- Deterministic AEAD
- Streaming AEAD
- Available in Java, C++, Objective-C
- TODO in Go, JavaScript, and Python
- Open source driven PHP
- Integration with KMS offerings
- Java: AWS, Google cloud KMS, Android keystore
- Objective-C: Apple Keychain
- C++ (in prep): AWS KMS, Google Cloud KMS
Summary:
- Tink: crypto tool for non-crypto devs
- Multiple langauges and platforms supported
- Secure, simple, w/ key rotation, readable, extensible
- Thread safety, security against side channels, efficiency, and versioning
- Open source contributions are very welcome!
Lightning Talks!
- Two remarks
- Blockchain
- Deprecating remarks are bacause of misunderstanding
- Urges participation of cryptographers in Hyperledger
- Wants contribution on “Ursa”, a crypto lib
- Blockchain
- Zero Knoweldge industry is growing very fast.
- Mainly related to Blockchain space
- An initiative called zkproof.org
- Open initiative between academia and industry
- Wants to create a set of community standards from the theoretical level to practicioners
- Planning a second workshop in April 2019
- Open submissions for proposals
- Also contributed talks
- Has a very experienced steering committee
- AWS Crypto tools’ goal is to make devs crypto problems go away
- “We write crypto so you don’t have to!”
- Working on many crypto and generic tools that don’t work directly with AWS
- Wants to know what the community needs, code review, plugins, different KMSs, and interoperability with other systems
- Would love to chat
- They’re hiring!
- Announcements on:
- Secure messaging
- First analysis of Signal protocol
- Formalized properties
- Modularizable (Post quantum signal when???)
- Random Number Generation
- Finally have right models for RNGs
- Secure messaging
- Co-author of TLS1.0 says:
- Wants to be known as the architect for the Decentralized Identifier
- Decentralized Identifiers are associated with Blockchains to a fault
- W3C is going to formalize a working group on it.
- Spec is up as an early draft form
- Over 20 companies have implemented various versions of it
- Great for solving anti-correlation, anonymity, “the decentralized problem” (lolwut)
- Rebooting web of trust is March 3rd in Barcelona
- Blockchain commons is trying to fund independent devlopment
- Very funny bit relating addiction support to blockchain stuff from Brent from Evernym.
- Crypto means cryptography
- Digital Asset
- A DLT company
- Claims every stock trade in Australia will be processed by them
- Building a language to model business workflows across parties
- High level
- Building a platform that’s a runtime for the language
- Looking for cryptographers and people in formal methods
- On the standardization of a BLS signature scheme
- Uses pairings
- Nice efficiency properties
- Specifically aggregation
- Very useful for Blockchain
- Algorand is working with Dan Boneh and others to standardize the scheme
- Will soon submit a draft to CFRG
- Subspace labs is building a decentralized database protocol
- Essentially equivalent to Google firebase with a decentralized backend
- https://subspace.network/
- Easy Safe is distributed and encrypted filesystem
- Wants people to break it
- https://easysafe.io/
- Crypto Quanthique developed first quantum secure something in silicon
- Looking for more chip developers
- Scott from Paragon Initiative Enterprises
- PHP
- It powers 83% of web servers according to W3C
- Wordpress powers a lot too
- Needs more attention from the crypotgraphic community
- PHP
- Unsure of this one
- PhD student from Brown university
- Cryptography always challenged the limits of possibility e.g. ZK Proofs
- What if we want to prove ignorance of something?
- Recent work is proofs of ignorance
- Joint work with Yale and Microsoft Research
- A password generation scheme
- word passphrases are too long
- entropy per character is bad
- BIP-39 reference
- Pick five words, take first four chars of each
- Good low bound on entropy
- word passphrases are too long
- Shameless self promotion
- New variants for one of Bleichenbacher’s attacks
- Katriel
- Take a minute to think about trees.
- Organizing a London Crypto Day
- Like RWC, but smaller
- Has a mailing list
- 7th of March
- DJB
- No one enjoys United airlines
- Very expensive whiskey
- If you’re flying united this month (Jan 2019)
- Free vouchers for drinks on United lol
- Tech lead for Key Transparency at google
- Key transparency at Google is open source
- Also included cert transparency, binary transparency, among other things
- https://keytransparency.org/
- Recommendations for SMPC
- Something really strong Russian accent
- An open source project:
- We have lots of keys
- Majority of people have problems backing up keys
- It’s a work-in-progress
- Looking for collaborators
- It’s a Google project
- Couldn’t understand name
- Nadia likes to break cryptography
- The DSA and ECDSA schemes are randomized
- Very important to generate random values carefully
- A recent work on eprint
- Examined signatures on blockchains
- Used lattice reduction to compute vulnerabilities
- Found an attacker w/ bad nonce generation
- Cool paper, 10⁄10
- The DSA and ECDSA schemes are randomized
- Jeff from Web3
- They’re hiring!
- Organizing a meeting on mix networking
- In Brussels
- An invititation to hashing to curve standardization
- Many mappings have been published
- None have proper mapping to hash to the curve
- Attempting to come up with algorithms to do this
- New results on eprint!
- Encrypted databases
- Useful for outsourcing data to untrusted server
- Still want to do queries on the data
- All schemes leak some information
- “What are the practical impacts of this leakage?”
- Attacks have targeted specific leakage
- There are some open questions on this leakage
- Access pattern leakage is leaked by all schemes currently
- Lots of theory speak
- Very interesting paper w/ practical attacks
- On eprint now!
- See https://eprint.iacr.org/2019/011
- Encrypted databases
- Many jobs available at RWC
- New results!
- Interoperability between blockchains
- Communication in a decentralized way
- A formal definition for a sidechain protocol to be secure
- on eprint
- “Proof of Stake sidechains”
- Organizing a Summer school on Real World Crypto on Privacy
- In Croatia
- In June
- Mozilla Security Engineering team
- Open position for Cryptography engineer
- Another in six months!
NIST PQC Round 2 Announcements
- The Government is currently shutdown.
- NIST cannot present the Round 2 candidates
- Thanks, Donald.
Direct Anonymous Attestation in the Wild
Outline:
- DAA in theory
- History
- Formal Analysis
- DAA in the Real World
- Vehicular use case
- Implementation Challenges
Direct Anonymous Attestation
- Anonyous Digital Group Signature Scheme
- Strong but privacy-preserving authentication
- ISO/IEC 20008 2013
- Hardware-based attestations using Trusted Platform Modules (TPM)
- Properties of DAA:
- User controlled Anonymity
DAA Schemes:
- TPM 1.2
- [BCC04]
- RSA based
- ISO/IEC 20008-2 mechanism 2
- TPM 2.0
- [BCL08, BCL09]
- Pairing based
- smaller keys and signatures
- proposed for FIDO 2
- ISO/IEC 20008-2 mechanism- 4 & ISO/IEC 1189
- Enhanced Privacy ID (EPID)
- Used by Intel SGX
- Improved Revocation
TPM 2.0 DAA Vulnerabilities
- TPM 2.0 API was insecure [ANZ13]
- Static DH oracle present
- Fix: Update protocol
- Use of BN P256 Curve
- 128-bit security reduced to 85-bit
- Fix: Move to larger curve
- BN0638 already in standards
Formal Analysis of ECC-DAA:
- Found an attack when the endorsement key of one TPM is compromised, the securiy of all TPMs cannot be guaranteed in a JOIN
- Identified a fix by including the TPM public endorsement key during a Join
- Paper under review
- Soon ™
DAA impelementation in vehicular architecture:
- Use-case targeting V2X communication using DAA
- V2x requires authentication and privacy
- State-of-the-art: Public Key Infrastructure
- Might be problems with scalability
- TCG Automotive-thin profile for TPMs in vehicles
- [TCG15]
- Vehicle credentials (pseudonyms) can be created, signed, and verified using DAA
Immplementation of vehicular architecture
- Hardware
- Raspberry Pi 3B
- Infineon TPM 2.0 developer module
- NexCom VTC in-vehicle computer
- Software
- C++/Java
- OpenSSL
- AMCL Cryptography library
TPM implementation challenges
- Multiple TPMs had different versions
- ECDAA Signature for TPM 2.0 version 1.16 up to Errata 1.4, different to TPM 2.0 version 1.16 Errata up to 1.5 and TPM 2.0 version 1.38
- Accomodating these differences made th system more complicated
- Complexity
- >1600 pages of docs
- Insecure curves
- BN P256 insecure
- BN P638 secure but unimplemented in TPM
- TCG should update standards to require more secure curves
- Compatible crypto libraries
- “Exotic” cryptography not widely implemented
Future TPM - A Quantum-Resistant TPM
- Goal: to develop a quantum-resistant TPM
- Supposedly lattice-based
Conclusion:
- TPM development is hard
- Consider other use cases for DAA
- Unsure if who is using it or why they want to use it
- Want to revisit FIDO 2 ECDAA Scheme
So how hard is solving LWE/NTRU anyway?
Learning With Errors:
- Given (A,c) find
s
when:C = A * <s + e>
An attack:
- The primal attack
- Reformulate
c-A * s = e mod q
over the integers - In other words, there exists and integer-linear combination of the columns of B that produces a vector with “unusually” small coefficients
- Reformulate
Computational problem: - The SVP problem
LLL Algorithm:
- Oldest latice reduction algorithm
- Geometric Series Assumption:
- The shape after lattice reduction is a line with a flatter slope as lattice reduction gets stronger
Slope:
- The slope depends on the root Hermite factor which depends on the basis
Strong Lattice Reduction - BKZ Algorithm
- Iterate over vectors asking an oracle for the shortest vector in a set
- Repeat until there are no more vectors to iterate over
- After 4 to 8 tours, the output doesn’t change much.
- It’s not very clear on how to come to this estimate, it’s an open question
Solving SVP:
- Sieving:
- Produce new, shorter vectors by considering sums and differences of existing vectors
- Time: 2^O(b)
- Memory: 2^O(b)
- Enumeration:
- Serarch through vectors smaller than a given bound: project down to 1-dim problem, lift to 2-dim problem..
- Time: 2^O(b log b) or 2^O(b^2)
- Memory: Poly(b)
Enumeration estimates:
- Both estimates extrapolate the same data set
- Simulation [Che13]
- Extended Enumeration Simulation
- FP(y)LLL Simulation
- Source code available soon™
Sieving vs Enumeration:
- Sieving is asymptotically faster than enumeration, but does it beat enumeration in practical or cryptographic dimensions.
- G6K^8 - a Python/C++ framework for experimenting with sieving algorithms (inside/outside BKZ)
- Does not take the “oracle” view appealed to earlier, but considers sieves as stateful machines.
- Sieving outperforms enumeration at blocksize 70
Open Questions:
- G6K does not support coarse grained parallelism accross different machines yet; not clear how exponential memory requirements scales in this regime
- Practical performance of asymptotically faster sieves still unclear
- What if we use dedicated hardware?
- Many submissions use small and sparse secrets where combinatorial techniques apply.
- Cost of these is not understood
- (Structured) Ideal-SVP is eaiser than General SVP on a Quantum Computer.
- Ring-LWE (but for a choice of parameters typically not used in practice) is at least as hard as Ideal-SVP, but is not clear if it is harder, e.g if those attacks extend.
- The effect of decryption failures in probabilistic encryption based on LWE is not fully understood.
- Some submissions completely eliminate these.
[ This was a very hard talk to notate, it had many graphs for context ]
An Account of the ISO/IEC Standardization of SIMON and SPECK
ISO/IEC Meeting, Jaipur meeting:
- Dual EC
- NSA designed PRNG (DRBG)
- Backdoored
- Snowden revelations: Project BULLRUN
- Standardized by ISO
- “Elephant in the room” during ISO discussions
- Study Period on NSA proposal for new cryptography algorithms
- Debby Wallner - US Head of Delegation
SIMON and SPECK
- Block Cipher families
- Used in modes of operation for encryption, authentication/integrity, build hash function, etc
People are still making new block ciphers?
- What’s wrong with AES?
- Diversity
- Country preferences:
- China
- Korea
- Russia
- Japan
- Research
- Implementation-targeted ciphers
- MPC-friendly ciphers
- Side channel resistance
- Performance, efficiency gains
NSA proposed two block ciphers (SIMON and SPECK) for lightweight block ciphers. This effort emerged in 2013.
Why standardize at ISO?
- Country A develops algorithm X
- Country B doesn’t like X, it blocks all products containing X
- If both A and B are in the WTO, then country A can appeal to WTO
What about NIST?
- John Kelsey at RWC 2015 said NSA is encouraged to bring algorithm proposals to conferences and standards meetings
Recap:
- 2013: SIMON and SPECK made public on eprint
- Snowden revelations, Dual EC revoked from standards
- NIST tells NSA to get external Vetting
- ISO rejects NSA proposals
Goal:
- Shed light on the process which leads governments and industries to agree upon the algorithms which secure their digital communications
- When is ISO/IEC the right venue?
- What’s the relationship with NSA?
SIMON and SPECK were submitted at:
- ISO
- IEC
- JTC 1
- SC 27
- WG 2
- SC 31
- WG 4
ISO/IEC Process:
- Registration through national bodies
- Two-layered consensus: expert + national bodies
- Consensus = no sustained opposition (not the same as unanimity)
- Decisions made at physical meetings
Six steps to publication:
- Study period
- Working draft
- Committee Draft
- Draft International Standard
- FDIS
- Publication
Lots of important decisions happen at physical meetings and there are many working groups at the ISO meetings.
Observations:
- Consensus is ill-defined – unclear when a vote needed to be taken by experts, national bodies, when a vote needed to be taken, how that vote should be taken.
- Positive outcome: all clarified during SIMON and SPECK process
- Significant amount of time and resources
- Limits participation
- Most participate for short periods of time
- Lack of expertise
- Usual suspects: France, Germany, US, UK, Japan, Korea, Russia, China, Belgium, Luxembourg
- Burden of proof on those dissenting
- Not idea for security standards
Resulting difficulties:
- 3.5 years from start to finish, despite significant opposition at every meeting
- Procedural mistakes, in favor of SIMON and SPECK standardization
- Each country needs to be approached individually, asking whether they were ok with the standardization of SIMON and SPECK.
Technical Discussion:
- Cryptanalytic Results
- Generic Attacks
Cryptanalysis:
- Lack of security rationale (“Can’t release internal analysis”)
- Many publications on the analysis of SIMON and SPECK
- This is a good thing, it’s a great target.
- ARX ciphers are generally less well understood in academia
- Hardly any analysis on key schedule
- Aggressive decision: “30% security margin”
Generic attacks:
- Block ciphers always used in modes of operation
- Birthday bound attacks (Sweet32)
- Tiny block and key sizes
- April 2016 - defend 48 bit block sizes
- CTR mode fixes birthday bound problems???
- October 2016 - 48 bit removed, 64 bit remains
- April 2017 - all candidates below 128 bit block size removed
- April 2016 - defend 48 bit block sizes
- Backdoors?
- Very unlikely
- “Where are we going to install a backdoor, in the AND or the XOR?”
- Actual quote from NSA haha
- “Where are we going to install a backdoor, in the AND or the XOR?”
- Is it possible to backdoor block ciphers
- Implies PKE
- Whitebox crypto
- Very unlikely
Alternatives?
- AES is good for the vast majority of use cases
- Lightweight ciphers PRESENT, CLEFIA already standardized
- Chaskey, LEA, RC5
- Key schedules poorly understood: use permutation-based crypto
- If this concerns you
- Tweakable block ciphers much preferred to avoid birthday bound attacks
- NIST lightweight cryptography competition
Summary:
- WG2 “feels that both algorithms are not properly motivated and their security properties are not sufficiently understood.”
- Not a statement about the security of quality of the algorithm from the designers (NSA)
Conclusions:
- A complete erosion of trust towards NSA
- There was a lack of necessity
- It takes time to build these
FORESHADOW: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
Operating Systems:
- Controls sharing of system resources
- Enforces protection
- It’s not always trustworthy
- Can also be compromised
- It has some “superpowers” and can gain access to data.
Intel delivered SGX unto the world to solve these problems (joke)
SGX
- CPU hardware feature designed to allow (remote) secure computation
- “Developers can partition their application into processor-hardened enclaves… that increase security even on compromised platforms.”
- “Confidentiality and integrity: Enforced at the operating system, BIOS, VMM, SMM, or TEE layers even in the presence of privileged malware”
- Remote attestation and Provision: A remote party can verify an application enclave
- Available on most CPUs post-2016
SGX Security Model:
- We don’t trust anything but the CPU.
SGX Memory Organization
- SGX is allocated a dedicated place in phsical memory called “Enclave Pahe Cache (EPC), about 93 MB
- The EPC is encrypted and authenticated using the Memory Encryption Engine (MEE), with a key generated at boot time.
- As long as you trust the processor, no one can access physical memory.
- SGX memory is protected by abort page semantics
- No exception is raised on unauthorized memory operations (OS is not trusted anyway)
- Writes are ignored
- Reads return 0xFF (-1)
- Operating system is trusted to maintain availability.
- It’s allowed to securely move pages to and from EPC
- Pages are automatically encrypted when exported.
- It’s allowed to securely move pages to and from EPC
Security Model fine print:
- SGX does not provide explicit protection from side-channel attacks, it’s the developers responsibility for such protection.
- “You can’t break our side channel protections – we don’t have any!”
Speculative Execution Attacks
- Meltdown: A bug in most Intel CPUs and ARM
- Spectre: A design flaw in most modern processors
- Results:
- Bypass the user/kernel protection boundary
- Bypass language-based protection
- Limited bypass of the cross-process protection boundary
- SGX protection still holds…
Enter Foreshadow:
- Foreshadow exploits a “feature” of Intel’s implementation of the virtual address translation mechanism
- In a case of a fault, abort address translation with intermediate values left behind.
- “Why not? We’ll clean it up later” - saves some cycles
- Intermediate values are then used to perform memory accesses
- As if they were correct physical addresses
- SGX memory checks are skipped (no 0xFF)
- Boundaries between VM and host are ignored
- System Management Mode (SMM) checks are skipped
- If data is present in L1$, it is given to the execution core
- Leaked via the cache side channel
- By the time the fault is discovered, it’s too late!
SGX Security:
- Aims to offer security in a model where everything except the CPU is corrupted
- As KPTI does not apply to SGX, post Meltdown SGX is less secure than the kernel
- Data in L1 can be leaked from userland
- Gets much worse if we assume a hostile OS
- “It is the developer’s responsibility to address side-channel attack concerns”
- Can’t be done! Can leak ~100% of the data ~100% of the time
Collateral damage and Countermeasures:
- It gets worse…
- Every SGX machine has an EPID private key.
- Intell says that these keys cannot be seen.
- Foreshadow recovers an EPID key
What can you do with an EPID key?
- EPID is used for remote attestation
- It’s used to prove that the machine ran some computation on data
- Signs a “quote” using the EPID key.
- Intel offers a verification service (Intel Attestation Service)
- Trust is based on the EPID key!
A single EPID key can be used to sign millions of unlikable signatures. This erodes trust in the entire ecosystem.
RISC-V: An Open Platform for Security R&D
What is RISC-V?
- Fifth major RISC design effort at UC Berkeley
- High quality, license free, royalty-free RISC ISA
- Used to design everything from tiny microcontrollers to multicore servers with domain specific accelerators
- Development started in Summer 2010
- Early workshops were a couple of handfuls of graduate students and faculty from Berkely & MIT
- The latest RISC-V Summit had >1000 attendees and hundreds of companies were represented
- A platform for doing open secure hardware R&D and product development for very low cost.
RISC-V Community Evolution
- Latest RISC-V Summit
- December 2018
- ~2x attendance in frowth
- ~250 abstracts
- 59 sessions
- 29 exhibitors
RISC-V Foundation
- ISA governed by a non-profit foundation since Summer 2015
- Over 200 members
- RWC attendees should be excited about individual membership
Why is RISC-V interesting?
- Simple
- Far smaller than other commercial ISAs
- Clean-slate design
- Clear separation between user and privileged ISA
- Avoid micro-architecture or technology-dependent features
- Modular
- Small standard base ISA
- Multiple standard extensions
- Designed for extennsibility/specialization
- variable-length instruction encoding
- vast opcode space available for instruction-set extensions
- Stable
- base and standard extensions are frozen
- additions via optional extensions, not new versions
- Much simpler languages to develop with
- No complex hardware languages
- Looks like OOP, or functional languages
- e.g Haskell or Java
RISC-V + Security:
- Top-level Security Standing Committee to provide leadership, guidance, and strategy
- Two active task groups
- Cryptographic extensions
- Broad set of crypto algoritnms via instructions
- leverages work from vector extensions
- Trusted Exectution Environemnt
- Different shaped enclaves for different kinds of SoCs
- Microcontroller, server-class CPUs
- Different shaped enclaves for different kinds of SoCs
- Cryptographic extensions
Security-Related R&D
- several mechanized formal specifications of the ISA and (possibly secure) cores
- MIT, SRI, Cambridge, Galois, Symbiotic EDA
- Several cryptogrpahic extensions implementations
- From ad hoc to formally synthesized, from not tested at all to formally verified, from leaky to side-channel free
- Secure-boot implementations and enclaves
- from ports of large historic nightmares to formally verified implementations
- SSITH teams are creating dozens of secure SoCs that include dozens of security features.
Why should RWC participants care?
- Clean ISA and extension framework
- Extending an existing CPU with new ideas in security is straightforward and has minimal cost
- $99 FPGA
- we aim to get security right in a principled way
- Extending an existing CPU with new ideas in security is straightforward and has minimal cost
Mailing list: https://riscv.org/mailing-lists/
True2F: Backdoor-resistant authentication tokens
Hardware 2FA tokens are effective against phishing
U2F protocol Steps:
- Registration
- Associate token with account
- Authentication
- Upon login
- Token sends reponse to challenge
U2F defends against phishing and browser compromise – even if malware takes over your browser. It can’t authenticate without the token.
What about token compromise?
- Imagine a supply chain attack
- Malicious key also knows the challenge/response
- Serioulsy undermines U2F security
True2F is an enhancement of U2F
True2F Goals:
- Augment U2f to protect against backdoored Tokens
- Backwards compatible with existing U2F servers
- Performant on commodity hardware tokens
Design Principles of True2F:
- Both browser and token should contribute randomness to the protocol
True2F adds a third step to U2F – Initialization
- Initialization generates a keypair split between the browser and token.
- Don’t want token or browser to entirely know the key
- Don’t want token to influence choice of key
- “Collaborative key generation”
- Token cannot bias the public key.
- Browser learns nothing about secret key.
Our CKG protocol (Initialization)
- Pick random v, r
- Commit to c = H(v,r)
- Compute v’ and g^v’
- Compute V’ * g^v
- return v,r
- Check c = H(v, r)
- Sorry for not annotating characters.
Verifiable Identity Families:
- Derive server-specific keypairs in a deterministic and verifiable way from the master keypair
VIF properties:
- Unique – the token can produce the unique keypair for a site.
- Verifiable – The token can prove to the browser that the pubkey is really the unqieu pubkey for a site.
- Unlinkable
- Unforgable
Simplified VIF construction:
- Token holds secret x
- Browser holds g^x
- Browser sends a = H(site)
- token does sk,pk = (ax, g^ax)
- browser does a = H(site)
- Check if pk = X^a
New primitive:
- Firewalled ECDSA signatures:
- Token and browser use collaborative key generation
- Because of ECDSA malleability, signatures are re-randomized by the browser
- See the paper for details
- [AMV15], [MS15], [DMS16]
True2F implementation:
- Google development board running True2F
- Google production USB token with same hardware specs
- Size of a penny
- ARM processor based
True2F is only 2.5x slower than U2F when fully optimized. In the browser, True2F is only 12-16% slower than U2F.
- Don’t settle for untrustworthy hardware
- True2F augments U2F
- Backwards compatible
- Practical to deploy!
- Next step: FIDO standards body
Fast, Furious, and Insecure
Passive Keyless Entry and Start:
- Car sends keyfob challenge
- Keyfob responds to unlock car
Tesla Model S fob:
- Contains UHF antenna
- 3D LF antenna
- MicRF112 Transmitter IC
TI MS37F128
- MSP430 MCU
Data sheets on TI chips are secured by NDA
Getting Started:
- Cannot order the ICs from Farnell/Digikey
- Just buy the chips in China (lol)
- Uncommon package (30 pin TSSOP - 0.5mm pitch)
- Almost no public info on these chips (NDA)
- The information that’s available isn’t consistent.
Uncovering undocumented SPI commands:
- SPI BUSY line indicates when slave is ready for next byte.
- Transponder indicates an error by pulling busy high or low for a long period
RF Reverse Engineering:
Two separate systems:
- Remote keyless entry system
- One way comms
- Passive Keyless Entry and Start
- Two-way comms
- Remote keyless entry system
Tesla had a great vendor response to these presented vulnerabilities.
McLaren did not have a good response.
[ Presenter is moving very quickly with lots of visual slides, hard to keep up ]
Day 3
Towards an Open-Source, Formally-Verified Secure Processor
- Timeshared systems should offer architectural isolaton
- Fundamental to privacy and security
- However, performance dictates microarchitectural optimization
- Isolation breaks because of shared microarchitectural state
- Sidechannels, etc
- Covert channels exist between processes
- As an attacker, the goal is to create a transmitter from the victim domain to the attacker’s domain
- Spectre
- Meltdown
- RSA Conditional execution
- Sidechannels are everywhere!
- Real systems are:
- Large
- Complex
- Cyberphysical
- Real systems are:
- Isolation breaks because of shared microarchitectural state
Build enclaves on an enclave platform, not just processes
On Enclaves:
- Should strengthen the processs abstraction
- Processes guarantee isolation of memory
- Enclaves provide a stronger guarantee
- No other program can infer anything private form the enclave program through its use of shared resourced or shared microarchitectural state
- Largely decouple performance considerations from security
- Minimally invasive hardware changes
- Takes a long time to make dramatic changes to existing platforms
- Provable security under chosen threat model
Who do you trust?
- OS Kernel (ring 0)
- Hypervisor
- BIOS
15 years ago, we didn’t think sidechannels would be as big of a deal as they are.
The Enclave Lifecycle:
- Create enclave, Grant resources
- Load enclave
- Seal enclave
- Enter enclave
- Process executes in an isolated environment
- Platform should erase (flushes) sensitive state
Strong Isolation Goal:
- Any attack by a privileged attacker on the same machine as the victim that can extract a secret inside the victim enclave, could also have been run successfully by an attacker on a different machine than the victim.
- No protection against an enclave leaking its own secrets through its public API.
- Three strategies for isolation:
- Spatial isolation
- Temporal isolation
- Cryptography isolation
The Sanctum Enclave:
- Resources exclusively granted to an eenclave, and scheduled at the granularity of process context switches are Temporaly isolated.
- Couldn’t complete this list
[ Speaker is moving too fast to collect enough details ]
Advanced Cryptography on the way to practice
- Advanced Cryptography
- Any primitives and techniques that look beyond the security of data at rest and communication channels
- Beyond Encryption and Signatures
- Examples:
- Multi-party Computation (MPC)
- Differential Privacy (DP)
- Zero Knowledge (ZK)
- Any primitives and techniques that look beyond the security of data at rest and communication channels
Cryptography research and adoption
- Past:
- Disk encryption
- SSL/TLS
- Present:
- Computation protection
- FHE, MPC, etc
- Computation protection
Advanced cryptography is: - Needed - Fast enough to be useful - Not “generally usable” yet
Efficiency measures: - Speed - Communication might be limiting resource - Online/offline efficiency - Asymmetric resources - Trade-offs between efficiency and utility
The need for advanced cryptography:
- Data is a valuable resource
- Why? Analyze and gain insight
- Extract essential info
- Build predictive models
- Better understanding and targeting
- Value comes from putting together different private data sets
- Why? Analyze and gain insight
- Challenges
- Liability
- Security breaches, rogue employees, subpeonas
- Restricted sharing
- Couldn’t complete list
- Liability
Privacy preserving computation scenarios
- Few input parties
- Equal computation power
- Connected parties
- Availability
- Federated learning
- Weak devices
- star communication
- Devices may drop out
Few Input Parties
- Private Set Intersection (PSI)
- “How can we compute the intersection of two private data sets without revealing anything about the input sets?”
- “Terrorists watchlist vs passengers on a plane”
- Private Intersection-Sum
- Google: Ad attribution
- “How can we compute the intersection of two private data sets without revealing anything about the input sets?”
- Private Information Retrieval
- Retrieve data at requested index without revealing the query to the database party
- Uses Homomorphic Encryption
- Computes on encrypted data
- See [ACLS18]
- General Two Party Computation
- Compute any function without revealing anything about the two parties
F(X, Y)
without revealing anything about X and Y
- Examples include Secure Computation for AES
- See [WRK17]
- Compute any function without revealing anything about the two parties
- Privacy Preserving Machine Learning
- “Out-of-the-box” use of general MPC is not the most efficient approach
- Make ML algorithms MPC-friendly
- Floating point computation is expensive in MPC
- Attempts to redesign with fixed point arithmetic
- Non-linearity is expensive in MPC
- Floating point computation is expensive in MPC
- Optimize MPC for ML computation
- Specialized constructions for widely used primitives
- e.g. matrix multiplication
- Precomputation of matric multiplication tables
- e.g. matrix multiplication
- MPC for approximate functionalities
- e.g. error truncation on shares, approximate FHE, hybrid GC+FHE
- Specialized constructions for widely used primitives
- Couldn’t complete list
- Privacy Preserving Distributed Linear Regression
- Solving Systems of linear equation with Fixed Point CGD [GSBRDZE17]
- Variant of conjugate gradient descent stable for fixed point arithmetic
- Solving Systems of linear equation with Fixed Point CGD [GSBRDZE17]
- Secure Neural Networks Inference
- Compute convolution neural network (CNN) prediction without revealing more about the model or the input.
- Hybrid solution of FHE and Garbled Circuits [JVC18] for secure CNN classification
- Evaluation is done using MNIST database
Federated Learning
- Secure Aggregation
- Compute sums of model parameters without revealing individual inputs
- Google’s interactive protocol for Secure Aggregation [BIKMMPRSS17]
- Aggregate parameters for global model without revealing the local model on a device
- PRIO: Aggregate Statistics
- Distributed aggregation with several servers (At least one honest server)
- MPC to verify proof and compute aggregate statistics
- Each device encodes an input and computes a validity proof, then sends part to each server
- Deploying in Firefox
- Differential Privacy
- The Output does not reveal whether an individual was in the input database.
- “What does the output reveal about a person?”
- Scenarios:
- Central Model
- Trusted aggregator computes aggregate functions and releases the output
- Local Model
- No trusted aggregator
- Parties randomize inputs before contributing it.
- This fits federated learning better than the central model
- Google RAPPOR [EPK14], Apple Privacy Preserving stats in iOS
- Challenges:
- Utility
- Privacy trade-offs
- Central Model
- Amplification: DP+MPC
- “Can we use sMPC techniques to get the best of both worlds?”
- Shuffle model
- [BEMMRLRKTS18]
- See Google’s Prochlo
- “Turning HATE into LOVE”
- [RSY18]
- Large-scale one-server vanishing participants MPC from homomorphic ad hoc threshold encryption
Zero Knowledge Proofs
- Prove you know something without revealing it
- Why?
- Blockchain applications
- Prove properties about encrypted data
- Machine Learning
- Prove input properties
- generate proofs for correct model training or evaluation
- Blockchain applications
- Efficiency properties of protocols
- Prover’s efficiency
- Verifier’s efficiency
- Succintness (proof length)
- Interactivty required?
- Trusted setup: common reference string
- SNARKS vs others
- Existing constructions require trusted setup
- Hybrid construction
- zkSHARKS [RVT18]
zkSNARKS:
- Most existing zkSNARK constructions leverage QAPS (Quadratic Arithmetic Programs)
- Pinocchio
- libsnark (Most used of these)
- Jsnark
- Buffet
- Distributed Zero Knowledge [WZCPS18]
- Distributes the proof generation on a cluster
Zero Knowledge without trusted setup - Efficiency is worse than SNARKs - Some discrete log based - BCCGP - Bulletproofs - MPC based - ZKBoo++ - Ligero - IOP Based - Hyrax - ZK-STARKS - Aurora
How to use Advanced Crypto?
- No “out-of-the-box” use
- Hiding complexity
- Setting parameters is hard
- Implementation code quality
- Comparison accross frameworks is non trivial
- Standardization efforts are ongoing
- Homomorphic Encryption - https://homomorphicencryption.org/
- Zero Knowledge - https://zkproof.org/
It’s time to put these tools to use. – Shai Halevi
Deploying MPC For Social Good
Boston University partners w/ MPC
- Combatting Opiod Addiction
- Pay Equity
- Medical Data Sharing
- Economic Inclusion
- couldn’t complete this
Closing the Wage Gap in Bostom (see BWWC)
- Understanding the root causes of the wage gap
- Closing the gap
- Evaluating success
MPC is used to protect company data but also allow for studing the wage gap.
Roles & concerns:
- Lawyer
- Liability
- BWWC
- Participation
- HR/Diversity Personnel
- Usability
- Actually contributing the data
- IT Personnel
- Auditability
- “Does it provide the security guarantees that we need?”
MPC Solution:
- Additive secret-sharing scheme
- Semi-honest model
- Uncovering errors in input data is difficult
- Requires thoughtful UX/UI to ensure accuracy upon submission
- Also allows for updates and revisions
- Has been successfully deployed twice!
- Wants to deploy again in Fall 2019
Economic Inclusion: - Supporting local minority-owned businesses - More than 10 companies participating in these deployements - Smaller scale than the wage gap deployments - Upcoming deployment in March
Detecting seriel perpetrators of sexual misconduct:
- Callisto
- Students were 6x more likely to report
- 3x more likely to see out medical and emotional support
- 15% of survivors were matched with another survivor who reported the same perpetrator
- Identifying information about a survivor and the accused can only be decrypted by a lawyer whan at least 2 users name the same perpetrator.
- Uses Shamir’s secret sharing
- See Callisto whitepaper
- “Trauma informed design” (Wow, this is awesome!)
[ I need to write a separate note on this talk, it was great! ]
Towards Transparent Zero Knowledge Computation
Transparency and Scalability
- Protocols
- See “Secure Multiparty Computation Goes Live” from Financial Cryptography 2009
- Platforms
- LAN
- Transparent
- Difficult to Scale
- Cloud
- Less transparent
- Scalable
- Blockchain
- More transparent
- Scalable if…
- LAN
Trust - real or perceived?
- Single point of trust is bad
- Desire to have no single point of trust.
- Who controls nodes?
- Participant based trust
- Delegated trust
10 years of commercial use cases:
- Partisia
- something something blockchain
- private computation
- Tailor cloud-based auctions
- Key management
- Privacy-preserving statistics
- Auctions
- Protocol with a protocol
- Types
- Exchanges
- Procurement
- Interrelated auctions
- Goods:
- Production contracts
- Spectrum rights
- electricity
- diamonds
- Matching
- Off-exchange matching
- MPC-based
- on-chain settlement
- Fast and fault-tolerant
- Crosspoint IO with Tora.com
Privacy-preserving Analytics:
- Public-private virtual platform
- Blockchain based data broker
[ This is truly a horrible, irrelevant talk. I’m done taking notes on it. ]
A Full Cryptocurrency Custody Solution Based on MPC and Threshold ECDSA
Custody and Protection
- Exchanges
- High turnover
- Need to speed up transactions
- Can take days to weeks today on exchanges
- Separation of vaults (large, medium, small)
- Higher protection on larger vaults
- High turnover
- Custody Solutions (for banks/financial institutions)
- Small turnover
- Complex transactions acceptable (and desired)
- Very large amounts of funds
- Offered to high-end customers
- Small turnover
- Wallets
- For end users
- Small amounts of funds
Solution Platform Requirements - High security - Protection against key theft and fraudulant key usage - Backup and disaster recovery - Flexibility - Fine tune security vs usability (ease of transfer) - Broad support - Different coins/systems - Different signing algorithms - Standards (e.g BIP32, BIP44)
Cryptographic Core – Threshold Signing
- Multiparty protocols with full threshold security for malicious adversaries
- Support ECDSA, EdDSA, Schnorr
- Supports distributed key generations
- Achieves proactive security (post-compromise security)
- Rich access structures supporter for all
- Support AND/OR of sets of parties
- Different structures for different levels of sensitivity/security.
- Two types of parties:
- Online signing parties
- Run actual MPC protocol
- Hold a subset of shares
- Offline authorization parties
- Approve operating and prives shares to online parties to carry out protocol
- Online signing parties
Protocol vs Platform
- Threshold cryptographic core is central, but not enough
- Many other elements needed, and influence cryptographic core
- Secure backup and disaster recovery
- support standard key derivation
- Proactive security (post-compromise security)
- Party administration (add/remove parties)
- The above all needs to work with the core threshold signing protocol
Our solution – additional components
- Publicly-verifiable backup with ZK proofs
- RSA (or any) public key provided
- Don’t need additively homomorphic
- Each party encrypts its share of the key with RSA
- Each party proves in ZK that the encryption is correct
- For share
x_i
all parties knowQ_i = x_i * G
- For share
- RSA (or any) public key provided
- ZK proof idea
- Encrypt
r_i
andr_i - x_i
and publishR_i = r_i * G
- Upon challenge to open one, let
t_i
be decrypted value - Couldn’t complete
- Encrypt
- Support BIP32/BIP44 key derivation in MPC
- Derive all keys from master key
- Enables backup only of master key
- Derive all keys from master key
- BIP derivation in MPC
- Naive: use garbled-circuit based MPC for SHA256/SHA512 derivation
- Cheating party can input different key share and render backup useless
- Verified:
- We define MPC protocol that verifies that correct shares are input
- couldn’t complete
- Naive: use garbled-circuit based MPC for SHA256/SHA512 derivation
- Proactive (post-compromise) security
- Refresh shares held by parties - breach of any subset of an authorized quorum in a period reveals nothing
- Achieved by jointly generating and sharing a random polynomial with zero constant-term, and adding to shares
- couldn’t complete
Threshold ECDSA
- Long-standing open problem to sumultaneously achieve
- Full threshold (any number of corrupted parties) and;
- Efficient key generation
- Two party:
- Based on Pailier additively-homomorphic encryption
- Based on OT
- Higher bandwidth, faster time
- Multiparty
- Honest majority
- Any number of corrupted
- couldn’t complete
New Threshold ECDSA Protocol
- New protocol!
- Couldn’t complete
Solution in [GGN16]
- Each party chooses two random shares
k_i, p_i
- Use additive sharing:
k = k_1 + ... + k_n
- Use additive sharing:
- Couldn’t complete
Instantiating the Additively Homomorphic Encryption
Decryption
- In parallel to working in El Gamal
- Parties hold additive shares of values
- Addition: locally add, and add El Gamal ciphertexts
- Multiplication by scalar: run protocol to get additive shares of product, and multiply El Gamal in exponent
- The multiplication protocol only needs to be private
- Given shares of
a
and value(r * G, r * P + a * G)
, verify and reveal - Private multiplication instantiations
- Based on oblivious transfer: very fast, but very high bandwidth
- Based on Pailier: low bandwidth, but more expensive
- Pailier keys are local to each party (no distributed generation)
Summary:
- New threshold ECDSA protocol
- Full platform with support for cryptocurrency protection
- Suitable for entire spectrum
- Wallet
- Exchange
- Custodian
- Includes verifiable backup, key derivation, online/offline signing
- Suitable for entire spectrum
- High security based on model of separation
[ Too many details going too fast, will update later. ]
A Tangled Curl: How we forged signatures in IOTA
Background:
- IOTA is a cryptocurrency for IoT
- 1 Billion market cap
- Peaked at 12 billion
- IOTA uses a DAG (directed acyclic graph)
- Partnerships with
- Bosch
- Volkswagen
- Uses a custom hash function called Curl
Terminology
- Payment is called “Bundle”
- Currency is called “IOTAs” (~$0.32)
- Measured in Millions (e.g. “1M IOTA”)
- Representation is in Trinary (trytes, trits)
Why examine IOTA?
- Was in top 10 by marketcap
- Claimed to solve many scalability problems
- Also claimed to be decentralized
- Wanted to prove why it sucks
- Ethan Heilman was told to examine Curl
- Took a weekend!
What is the attack?
- Bob signs a payment where he gets $2M and Eve gets almost nothing
- Even forges Bob’s signature and instead sends a payment where seh gets $2M and Bob gets almost nothing
- Chosen message setting
Currently doesn’t impact IOTA security
What is “multisig”?
- Kinda like two-person rule for nuclear launch
- both keys must be present
- one person, alone, cannot launch
Multisig payments
- A valid payment requires k-of-n signatures
- Why?
- Attacker has to compromise k keys
- Can store keys in isolated locations (cold storage)
- couldn’t complete
IOTA background: Signatures
- IOTA builds on Winternitz One-Time Signatures (WOTS)
- Ethan was excited to see someone using these!
- IOTA modifies WOTS
- To hash messages with Curl-P-27 prior to WOTS
- Signature scheme doesn’t matter for attack
Exploiting Colliding bundles - unauthorized payments
- Eve creats two bundles
- Have same hash
- Even gives benign bundle to Bob
- Bob then signs the Bundle
- Sends back to Eve
- Eve copies Bob’s signature from the benign bundle to the evil bundle
- Eve signs and broadcasts the evil bundle
Note: No racing required here, Eve can only broadcast the bundle.
Placing collisions to pay different amounts
- Target value fields for differing trits
- Create two colliding bundles which differ in 26th trit of two message blocks
- Limitations
- Can only play this trick in specific places
Note: works for more than multisig payments, CMA attack fits well here though.
Curl-P-27
- Built on the sponge construction
- Security depends on a transform function
- The transformation function in Curl-P-27 is just the repeated application of permutation and a simple S-box
Reducing collision resistance
- Choose random bundle
- If 26th trit is flipped, the probability of a collision is >1/(2^42.40)
- If clever about choosing the message, this increases to >1/(2^22.76)
Transformation function is simple
- Likelihood of collision is at least 1 out of 7.6 million
- Need to try many messages (bundles) before we are successful
- Change the 81-trit tag field in IOTA bundles to create collisions
- Effect
- Differences in the first third of the state are erased as new message blocks are copied
Discussion - what happened
- July 2017 - Disclosed to developers
- Replaced Curl-P-27 with Kerl
- Based on Keccak
- Curl-P is still used for PoW and milestone verification
- Coordinator is not open source
- Unsure if its still vulnerable to adaptations of this attack
- Replaced Curl-P-27 with Kerl
- IOTA claims that Curl-P was a “copy-protection mechanism”
Takeaways:
- Exploited weakenesses in Curl-P-27 to create chosen message signature forgery attacks
- Don’t roll your own crypto
- Cryptocurrencies have many interesting security and cryptographic challenges!
- See https://github.com/mit-dci/tangled-curl/
Troika!
- Another Ternary hash function from IOTA
- Released December 2018
- 200,000 euro prize pool to break round-reduced variants
A note on cryptocurrency security:
- Increasing number of cryptocurrencies and codebases
- Attackers can easily and anonymously exploit bugs for financial gain
- Challenging space to determine best practices for reporting, disclosure, deploying fixes, and communication
If interested in working on problems: narula@mit.edu