CRYPTO AND PRIVACY VILLAGE - Cloud Encryption: How to not suck at securing your encryption keys

Video thumbnail (Frame 0) Video thumbnail (Frame 1403) Video thumbnail (Frame 3547) Video thumbnail (Frame 4611) Video thumbnail (Frame 6692) Video thumbnail (Frame 8413) Video thumbnail (Frame 11539) Video thumbnail (Frame 13171) Video thumbnail (Frame 15313) Video thumbnail (Frame 17940) Video thumbnail (Frame 19841) Video thumbnail (Frame 21504) Video thumbnail (Frame 26129) Video thumbnail (Frame 27619) Video thumbnail (Frame 30974) Video thumbnail (Frame 33101) Video thumbnail (Frame 35847) Video thumbnail (Frame 43647) Video thumbnail (Frame 44984) Video thumbnail (Frame 49406) Video thumbnail (Frame 56604) Video thumbnail (Frame 62419) Video thumbnail (Frame 63844)
Video in TIB AV-Portal: CRYPTO AND PRIVACY VILLAGE - Cloud Encryption: How to not suck at securing your encryption keys

Formal Metadata

Title
CRYPTO AND PRIVACY VILLAGE - Cloud Encryption: How to not suck at securing your encryption keys
Title of Series
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
2018
Language
English

Content Metadata

Subject Area
Dependent and independent variables Key (cryptography) Bit Cryptography Encryption Point cloud Software testing Encryption Key (cryptography) Information security Window Computer architecture Point cloud
Area Data storage device Online help Bit Cryptography Frame problem Product (business) Message passing Data center Encryption Statement (computer science) Point cloud Encryption Information Physical system
Frame problem Slide rule Server (computing) Context awareness Real number Flash memory Virtual machine 1 (number) Data storage device Graphical user interface Military operation Operator (mathematics) Encryption Flowchart Cuboid Booting Physical system Key (cryptography) Flowchart Data storage device Cartesian coordinate system Frame problem Right angle Encryption Physical system Reading (process)
Encryption Point cloud Encryption Endliche Modelltheorie Implementation Process modeling Form (programming)
Game controller Functional (mathematics) Building Implementation Server (computing) Service (economics) Variety (linguistics) Primitive (album) Proper map Different (Kate Ryan album) Computer configuration Encryption Energy level Endliche Modelltheorie Information security Computing platform Systems engineering Point cloud Authentication Email Key (cryptography) Block (periodic table) Server (computing) Cryptography Data management Personal digital assistant Point cloud Encryption Quicksort Fundamental theorem of algebra
Rotation Default (computer science) Context awareness Mobile app Game controller Key (cryptography) Block (periodic table) Uniqueness quantification Software developer Bit Mereology Cartesian coordinate system Web application Film editing Analogy Software design pattern Encryption Cuboid Right angle Information security Position operator Physical system
Mobile app Service (economics) Key (cryptography) Cryptosystem Hidden Markov model Cryptography Perspective (visual) Data management Goodness of fit Different (Kate Ryan album) Encryption Encryption Key (cryptography) Exception handling Physical system
Mobile app Existential quantification Game controller Service (economics) Hidden Markov model Mereology Public key certificate Code Data management Bit rate Operator (mathematics) Encryption Physical system Identity management Area Rotation Service (economics) Electric generator Key (cryptography) Relational database Software developer Quadrilateral Data storage device Electronic mailing list Bit Cartesian coordinate system Cryptography Data management Customer relationship management
Slide rule Game controller Service (economics) Variety (linguistics) Combinational logic Online help 2 (number) Permutation Data management Computer configuration Encryption Selectivity (electronic) Position operator Identity management Service (economics) Multiplication Electric generator Key (cryptography) Computer simulation Cartesian coordinate system Degree (graph theory) CAN bus Number Exterior algebra Point cloud Moving average Key (cryptography) Figurate number
Scheduling (computing) Functional (mathematics) Service (economics) System administrator Mereology Frequency Latent heat Flow separation Internet forum Root Internetworking Different (Kate Ryan album) Energy level Cuboid Summierbarkeit Physical system Condition number Key (cryptography) Smoothing Software developer System administrator Bit Instance (computer science) Cartesian coordinate system Limit (category theory) Software maintenance Flow separation System call Connected space Data management Sample (statistics) Software Logic Statement (computer science) Right angle Encryption
Laptop Point (geometry) Game controller Building Module (mathematics) Multiplication sign 1 (number) Hidden Markov model Online chat Mathematics Cryptography Computer configuration Different (Kate Ryan album) Computer hardware Encryption Cuboid Information security Metropolitan area network Plug-in (computing) Partition (number theory) Physical system Module (mathematics) Authentication Source code Noise (electronics) Focus (optics) Dialect Key (cryptography) Validity (statistics) Computer program Data storage device Computer Client (computing) Bit Cartesian coordinate system Cryptography Proof theory Data management Process (computing) Computer configuration Doubling the cube Reflektor <Informatik> Data center Point cloud System identification Encryption Key (cryptography) Window
Backup Service (economics) INTEGRAL Line (geometry) Heat transfer Computer configuration Operator (mathematics) Computer hardware Formal verification Bus (computing) Encryption Boundary value problem Software testing Endliche Modelltheorie Office suite Information security Physical system Module (mathematics) Multiplication Key (cryptography) Plastikkarte Instance (computer science) Cryptography Data management National Institute of Standards and Technology Data center Point cloud Procedural programming
Existential quantification Scheduling (computing) Building Parsing Multiplication sign Set (mathematics) Water vapor Mereology Neuroinformatik Data management Heegaard splitting Exclusive or Cryptography Different (Kate Ryan album) Encryption Bus (computing) Cuboid Software framework Endliche Modelltheorie Physical system Injektivität Enterprise architecture Binary code Data storage device Bit Instance (computer science) Digital object identifier Flow separation Connected space Data management Computer configuration Configuration space Normal (geometry) Procedural programming Quicksort Cycle (graph theory) Figurate number Automation Physical system Windows Registry Game controller Mobile app Backup Server (computing) Service (economics) Sequel Computer file Dependent and independent variables Continuum hypothesis Virtual machine Revision control Operator (mathematics) Gastropod shell Selectivity (electronic) Form (programming) Module (mathematics) Dependent and independent variables Standard deviation Key (cryptography) Information Planning Database Total S.A. Incidence algebra Line (geometry) Cartesian coordinate system Cryptography Software maintenance Radius Integrated development environment Query language Personal digital assistant Universe (mathematics) Data center Point cloud Video game Conditional-access module Key (cryptography) Table (information)
Axiom of choice Complex (psychology) Statistics Game controller Mobile app Context awareness Implementation Multiplication sign Workstation <Musikinstrument> Number Mathematics Authorization Encryption Cuboid Endliche Modelltheorie Computer architecture Execution unit Multiplication Key (cryptography) GUI widget Projective plane Planning Cryptography Cartesian coordinate system Flow separation Data management Pi Large eddy simulation Phase transition Point cloud Encryption Row (database)
starting us off this morning is Marie from she's going to be talking to us about cloud encryption how to not suck at securing your encryption keys take it away Marie thank you [Applause] yes that's gonna be the goal of today's talk how to suck less so anyway a little bit about Who I am I work in InfoSec cryptography and I'm trans I've done a lot of stuff over the years in Senate response testing reversing security architecture and for the rest of my career I really want to fix things I I see you know there's a lot of people that you know throw bricks through windows and stuff and you know I want to work with builders to actually fix stuff and you know this I think it's really important because right now there's a lot of really negative things happening because we are failing at security so badly so I want to see things stuff less now what kind of got
me thinking about this talk was something that affected probably most of the people in this room was the Equifax neighbor age and they had the CEO up on the stand and they were asking you know one of the questions was obvious was well was your data encrypted he actually said he didn't know which was amazing so I just I I was just stupefied by that first off and then the thing that really really really upset me was after they saw it they kind of issued some clarifications they said well you know maybe someone was encrypted maybe someone wasn't but you know encryption doesn't really help and and I just ended you saw the pundits you know in all the columns and stuff about well yeah you know encryption doesn't really help prevent and it's I just I know that for the people in this room I would almost guarantee that most of you would be able to encrypt something that I couldn't read so I mean that's that's kind of a you know kind of a basic thing and a make statements that well encryption doesn't really help prevent data breaches is a really bad message and it's it's partly due to the way things are being done the way cryptography has been used both on ground and pram and data centers and Wow so I'm gonna talk through a few different areas I'm actually going to start start on ground and talk about data center encryption that's it's
oftentimes kind of typical here's a big big storage frame you know you'd find in a big IT shop and you know the products look it's got all these cool things you know strong data at rest protection you know it talks about and they go on and say you know this these these are protected by you know AES which is which will protect top-secret government data you know so I mean they make these claims and you know the EMC dude you know makes a huge sale you know the the execs feel good you know our data is encrypted at rest and but let's talk a little bit about how these work before we get into the cloud so system
operation you know it boots up big Huracan machine you know and actually I should make a I started out this slide writing you know data written to rust and I thought oh wow you know that's oh so for you younger ones you know in the old days we had these spinning rusty things that we rotated to and now it's all flash but yeah you'll have to Google at it's really you know it's but the main so this these systems Buddha they read an encryption key that's so important you know it's right ooh protect it and then all data written as transparently encrypted as it writes right from the storage media and then on reads its transparently decrypted and so there actually is no awareness to the server of the application that this encryption is happening completely transparent you know systems connected via you known as orce and they just they think they're reading and writing data and it's cool and it's where encrypted at rest right you know that sounds really good so so one of the things about this if we look at this and say how well does this kind of encryption protect our data let's say say we had something like this and you know it does be compliance requirements we check that box that you know hey it's AES encrypted at rest but what happens if we have a data breach so
attacker comes in we'd actually do a flowchart a real simple flowchart attacker tries to access the data it was a storage frame on aha bummer the encryption did not protect our data with storage frame off hey we win we protected our data so you have to you know that's that's one of the things that when people say encrypted at rest you really have to understand what kind of threats that protects against so you know we look back at the storage frame example on the
ground you know it protects against a pretty narrow model of threats like say you know I have some bad drives and the DMC dude comes in and to replace them and he's taken him back for the depot and a couple of fall off of his bicycle you know that's um you know I can say you know those drives were encrypted at rest they were powered down they weren't spinning mmm so so this form of encryption if you think about this this thing that people say oh yeah it's encrypted at rest you know it just protects against this very narrow threat so when somebody says this hey my data
is encrypted at rest whether we're talking cloud or ground you really need to dig a lot lot deeper so let's dive
into the cloud now first of all I'll say you know not all data should be in the cloud you really need to think about risk modeling about you know understanding what your threats are you're compensating controls and I'm not I'm not here to bash cloud you know I think you know AWS as your people are using it successfully in a lot of cases but a lot of people are not thinking about cloud implementations of cryptography that actually protects data and you know so so AWS they give using all this amazing functionality do all sorts of stuff it's it's almost it's staggeringly complex there's so many different things you can do with AWS it's like every week I get an email the new things are adding to and it's like wow wow wow and it's like I don't know how you can stay up online but and actually I'll say AWS does give you some primitives that can apply a certain level of encryption to do things reasonably well for certain use cases but you really have to do proper systems engineering in this because if you don't this stuff is not going to be encrypted against the threats you care about like you know that somebody actually trying to take over your system and steal your data now you know there there is some interesting differences like an AWS I don't know if you looked at it but they've got different they offering different geographies and it'll say some of them are kind of interesting like China has stripped out all the encryption even the encryption built into the platform it's got no I am or two-factor authentication and so that might have some security implications and what you're building so so as we get into let's take a really simple example so a simple building block is s3 encryption
and it's used for user for all sorts of stuff it's a it's a basic fundamental piece of technology for storing a chunk of data now a lot of people don't necessarily real realize this but there's actually quite a few different ways you can encrypt s3 data so there's server-side encryption options include server side with the key managed by s3 server side with the key managed by km/s or Amazon's key management service and you can also do server side encryption with customers managed keys that you manage say in a variety of ways could be outside of kms and then there's actually client-side encryption options which can make a lot of sense to encrypt data before I ever stuff it up in there but but just this this very basic primitive of quote encrypting data and that's three it's got a whole bunch of different ways to do it so like say I'm a dev and I'm trying to figure this stuff out and I look at s3 and here's
this default encryption there's a checkbox that looks really good to me I love doing stuff with checkboxes because it's I can go on I can think about the application development I can think about you know all the stuff the wonderful things the business benefits my apps going to do and I can check that box and security folks are gonna be happy and you know there are some some kind of interesting things about the way Amazon does this with the s3 encryption they actually unique they encrypt each each bucket with unique key which is good you don't have a this shared key that unlocks a whole bunch of stuff mmm they they encrypt the key itself with a master key that it rotates regularly yeah that's kind of cool you know key rotation critical part of controlling your encryption keys mmm again it uses one of the strongest block ciphers available is right from the marketing material yes 256 to encrypt your data mmm so so this is this looks really easy to me I can check a box and I'm done but it's it's not really that simple and so for an analogy I would like to talk about physical system so taking this this context of an s3 bucket where it's doing this automated encryption if I
apply it to a door a door that I want to secure in a room that's got some stuff in it that I want to protect I can go out and I can buy a really nice deadbolt these are these are really good deadbolt sirs there's probably somebody in lockpick village it knows a way of opening these but but for for most of us I know I can't pick that deadbolt I probably can't saw it it's designed to not be beatable open and imagine this this deadbolt in front of this door and it's protecting people from going in grabbing the stuff I'm trying to protect and walking out so this is this is kind of similar to our s3 bucket we we want to make sure the right people are going in and getting our stuff but I would kind of assert that that last example of saying apply the default encryption into s3 is a little bit like having the massive door this really nice deadbolt but leaving the key and the door now that doesn't really protect that data right because anybody that can walk up to that door they they see and they can they can turn to walk so I mean they may have to do some positioning to get in front of the door you know maybe you know to take it back to the controls you might have a web application maybe they tunnel up through the floor cut to the ceiling or punching a wall but they can get in front of that door if that Keys there they just turn and walk through grab your stuff and walk out so this is kind of a design pattern that is not so great well we actually point to it we say it's encrypted we can sign a paper that's encrypted at rest instead encryption but it's actually not really very effective in stopping people from walking out with our stuff so there's a principle of
kerckhoffs principle it's kind of painless and it says any crypto system should be secure if everything is known about the system except for except for the key that that can all be public knowledge well if we're not managing our keys correctly or properly or securely we're leaving them in the door lock we certainly aren't really controlling this system from a cryptography perspective where we're failing so just maybe I'm saying that if we check that little checkbox and say using s3 server-side encryption with keys that are managed by s3 which sounds so easy because it's just checkbox maybe that isn't the protection that we wanted or needed so let's go on to the next way of encrypting data in s3 I remember I'm just talking about one service and all these different ways in encryption mmm I can use server-side encryption but instead of having us three magic keys I can put those in AWS km apps which is there Amazon's key management service now that comes with some tiny interesting things I'm going to dive into there's a lot of different ways you can set up Amazon kms and I'm gonna get into those hmm so here's I just changed
a checkbox mmm and I select the key that I've provisioned in kms and I'm off to the races sounds pretty good right now no you know maybe I'm a dev and say okay well now I just got to generate a key thingy and and now no I just encrypt and now I'm good mmm now kms can be used for a lot a
lot of things they've designed it to integrate with all their services you know you got s3 bucket CVS glacier do long-term storage you've got RT us for relational database services so so it is pretty cool I can build this you know simplified infrastructure somebody is trying to develop lot apps and I'm just trying to get my my thing out the door hmm I can use this kms thingy to hold the keys and that that sounds kind of good because well because it's a says it manages keys and sigh quads got to be better right well let's dive just a little bit into kms and see if some of the problems that we had with the the key and the lock with the deadbolt if we can see how we can stay away from those well Amazon's
key management service is pretty interesting and actually as in everything Amazon there's like five ways to do things I can in key management services I can use AWS managed customer master keys see MKS and and these are keys that are created managed and used on my applications behalf by the AWS service that is integrated with areas kms I can also use customer management fees so rather than just flooding Amazon just kind of do it automatically I can actually generate use a customer manage key and and I can do some extra things with that it's kind of cool some extra controls that I would argue may be wise on applications with very critical data so these things these include things like enabling and disabling the cmk which actually is a important thing come to later is if something's Bad's happening and you can detect it later on in the stack I can disable that cmk and actually prevent it from being used so I can rotate its cryptographic material I I can also set up I own policies or identity and access management policies they cover access to that specific cmk I use that cmk and cryptographic operations and I can do encryption as part of my code which is kind of cool and but but the important thing is I is customer maintain control of that cmk now there's data keys and those live outside kms kms doesn't manager control those and there is customer master keys key encryption keys and data encryption keys so we've done a little bit more complex and that Deb they just wanted to click a box and say yeah I want this thing encrypted now there's there's a whole lot of things to talk about or you know think about or design into you know multiple ways of encrypting with s3 and then if I use kms multiple ways of managing kms so so some things you know you might be thinking about it's like well you know what does this give me using you know doing customer manage keys well I named a few of the benefits like I can do I can do my own rotation I'm actually disabled and there's some there's some kind of cool things that I can I can do it gives me a little more fine-tuned control or but going on the permissions in a bit which is even you know maybe better mmm but some of the things we're not generating keys one of the things that's really critical to me is using really good ramp using a known good source of random you know I think I believe if I AMS has got FIPS 140-2 - - rating and smell you know they're they're working on certifications but you know picking random for a key generation is a really big deal encrypted cryptography we've seen this fail over and over and over and over again you know it's like a long list of failures of for random being used to generate a key and the system gets owned so this this thing about on the sing
about generating the key you want to really be careful or understand where your random comes from and that that may give you a reason why you should be generating your own keys there's also kind of another thing that another reason maybe to do this and customer generated Keys is if think about the clouds you know sometimes they turn dark and stormy and violent hmm and if you don't have your cryptographic key material for your applications stored somewhere safe on ground you could set yourself up for a pretty significant availability issue because now you've got encrypted data and no keys to access the application but always you know the selection of a random and cryptographic key generation and some sure everybody knows here is a really really big deal so I'm gonna talk
I'm gonna go slide back into the kms and on that second option customer mastery cmk s that our customer mat managed wow that's a hard one to say customer master keys that our customers mastered managed so there's you know as canvas and everything in AWS there's a variety of ways so so we're talking you know the multiple ways of encrypting s3 and multiple ways of using kms and now we'll there talk about multiple ways of flying controls to these keys which is kind of interesting there's there's three things that I can use to apply what what controls access to these these encryption keys there's a key policy document that's the describes usage of the key l show in a second there's AI AM policies or identity and access management policies and and these you can use those in combination with a cmk key policy to allow access to a cmk there this actually gets kind of complicated to simulate there there's an IM policy simulator tool that amazon is provided to kind of help figure this out because if you know it's I've been in the position or trying to review like what what has access to this key and it is non-trivial to dig into sometimes and then the third way of applying controls to this key is grants and and these are kind of cool because you can then specify with a high degree of granularity exactly what service and what what thing can use use a key for and how and that's that's really important there's and I'll show a couple examples of you know the key operators and and how they can be different with grants or just kinda neat and there are there an alternative to the key policy so you know I started the s3 and multiple ways of encrypting kms multiple ways of doing kms and now we've picked this one option customer master keys we've got multiple ways of doing this there's a lot of permutations here a lot of landfill minefields for doubts here's
a simple key access policy and don't believe me this is not real so yeah you don't hold my system so it had nothing nothing about this this is all fiction also but this is this would be typical for a key administrator a custodian so this in key management one of the one of your principles is you want the separation of duties you want two people maybe you know DevOps people and developers that are putting up applications together and they can they have a permission to have an application you know tie tie a given key to an application and that application has permission to use a key to do something but then you typically have another team if you're doing a write the separation of duties it has management capability on those keys and so this has got some some things like disable deletes and schedule key deletion cancel key deletion revoke so these some more administrative level things we have that separation of duties for a key management so this is oh yeah it's also possible to constrain a cmk so it can only be used by a specific AWS service through the use of a kms via service conditional statement so I can actually really nail this key down and say you know this can be used for this one thing period which is pretty cool I can kind of limit the usage of that key now
here's kind of a couple slides showing some differences of key access grants now I may want to bisect my application and say I have some internet forward-facing logic where people enter something into a forum and and you know that's what they do random people connect to the internet you know enter some stuff in a forum and it goes in there's an off function smooth stuff and then I got a separate team of people that work for the company they connect to the same system and they need to do some management functions they need to do some workouts maybe some edits you know check some stuff so if you bisect your application so where you have the internet facing logic and you have configured it for instance to where that internet facing logic can only have access to the encrypt function that key that's all it can do it can encrypt period it can decrypt so either that application gets owned it doesn't have the rights by this grant to decrypt any data so that the attacker that got got that got root on that box on they do not have the ability to decrypt data with this grant now maybe you have a separate network maybe through a you know Direct Connect or a VPN where your people doing the management on the system the maintenance of it or you know the call it the the the application owners they may be you know they may need they quite likely need the decrypt function so so this is an example of using these different grants to give different parts of the application different permissions and I'll build a little bit more defensive depth into your app and say you know the internet facing stuff we don't want them to ever be able to decrypt any data so I've been talking
you know I was working my way through s3 buckets and encryption now there's the last one server-side encryption customer with keys that you manage maybe outside kms or with a different system and then there's also client-side encryption options and I really do like those because you get a fine-grained control over your data of what you're encrypting if you think about it if I control the encryption I get data encrypted before it's ever stuck in s3 I don't have to worry about you know what happens you know in so many screws up permissions on bakit or changes in you know an apple or something like that you know I think that's consistent you know what I saw 2704 oh you know using encryption to to actually create these partitions of you know who can access things and I I think that that client-side encryption if you encrypt it before you put in s3 you won't be in the headlines about and you manager you keep those keys secured and that full process that encrypts the data and acts on it you will not be in the papers which is really good so you know there's there's also not just the door and I I think one of the things you know to extend this a little bit and kind of story I'm building if you know that first story I talk about that door and I've got that awesome deadbolt on ion point to it say that's my FIPS 140-2 - - rated deadbolt and you know it I can't beat this thing open I can't pick this lock but I'm gonna leave the key in the door people walk in and out with my stuff on spur now I know you know I don't know how many of you have been to it commercial data center but the process to get in is typically a little more involved you you walk up to a bulletproof window and you provide your identification they perform visual identification against your ID they then look and look in the computer and see if you're authorized to be there and say yeah you have a ticket to go in and do X & Y & Z at this time that's all what's right and then rather than you go in and turn the key in the lock they buzz a door into a man trap and you go on that you stand there to get out of the man trap and to proceed you need a you need a some some additional credentials with some badging and some two-factor token and stuff and then that gets you out that you're in now there's there's also there's a human involved in these logging stuff that you went in there you had a ticket to go in and do XY and Z and hopefully they're you know and they're typically awake enough to say yeah you come in here every three months and you do a thing and you leave now if I come in and I've made four trips in and out today that's unusual and if I try to pulp boxes out that's like double unusual because we're not supposed to be hauling boxes out so it's like they there that's a detective control built around that you know the authentication the authorization chat and all that and so we've built a little bit more controls over whether I can walk out with the stuff now with AWS those are some of the things we need to be thinking of is we're building applications it's not like is do are we using strong encryption it's not doing bupkis to actually protect the data we need to build these controls these additional things these additional layers around the application to do to do this properly so there are other ways of managing encryption keys and AWS of course there are there's many many different ways to do these things so whoops I'm just lost scared panicking it's like my laptop's plug-in it's like I was freaking out for a second don't oh so so Amazon actually has had a variety of things for doing key storage that aren't kms they had cloud HSM v1 or the classic hmm and that's that's just a just a simple Gemalto Harbor security module and hardware security module you don't know is this specialized box that's designed to have secure random generating krypton keys and protect them in hardware and tamper proof kind of systems to ensure that these keys can't be compromised so HSMs are used for you know for serious key management for keys that have some pretty big implication if they were ever to be compromised so if you're not from there with an HSM at Amazon they still support it a couple of the region's quad HSM B 1 which is the Gemalto luna and they they also they produced an HSM v2 which is kind of interesting they've kind of produced their own and they've submitted it for Phipps review and then you know there's there's third-party key management solutions like I listened to one there's a bunch of different ways to do noise there's different HSM vendors there's different key management solutions this is you know I if I have like a day to do this I could talk about a whole bunch of different ones but I got an hour you know focus on one but that's another thing that that can keep Keys securely so this is kind of interesting
you know as Amazon is submitted for Phipps validation their cryptographic module validation and it's they they got the stuff on its up its get some
interesting design aspects to it I really encourage you if you're if you're storing encryption keys and you're doing in Hardware should actually read these these module verification documents they're fantastic they're wealth of knowledge and in how these things are protecting encryption keys with what kind of what kind of threats and what was their threat model what's the security boundary and what are how would these test it and what do they protect against and if you dive into these NIST documents it's a really cool way of understanding a lot better and and you can also ask some interesting questions when you're talking to the AWS people for instance so as I talked about that
option you know there's also HSM so we use for key management from Gemalto from Telus gemalto's big player and in this stuff if you've got a cell phone or a US passport with a chip or a credit card yeah technology was made by them I'm not a shill for a company but they do make a lot of they make a lot of stuff so there's this is an example of an entry device it that's used with Gemalto equipment and and there's an important principle as you know if you're a two-factor you know it's well use guy used to that they know that's kind of common sense but there's there are some additional things in here and that we can use K of N or M of n operations so we we say you know we've got these five people on this team and we want to have at least three of them come together to do this operation you specify that and say you know we want to do this operation to transferring these pieces one to this other thing and we we want to make sure it's done on a very controlled manner we want to make sure there can be collusion or an individual just can't go off the rails steal all the encryption keys and go sell them to the Russian black market or something like that so with with these kind of systems you kind of get beyond the Amazon hey I have a key I can do a thing and you say we have we not only have a key to do a thing but it takes multiple of us to come together and do a thing and and then because if you know we can set it at any ratio we want and say we need three or five or you know four or seven or whatever it is we want and to solve the who am i god Marie got hit by a bus problem so if I you know if I get hit by a bus or you know something like that or you know just have too much fun at Def Con and never go home there are people that can can can carry on so this this is kind of cool having having more than one having more than one user required do critical encryption operations of you know such as transfer of keys and stuff backing up of keys because you know remember you know that this whole confidential confidentiality availability integrity if we lose keys that data is like on so you know we've seen that in a few be being weaponized as a service now but causing encrypting data and hiding your keys for Anselm's but when we're hosting stuff in the cloud we really have to think about that it's like we want to make sure that we can get this back assuming an asteroid it's a data center or something like that we we want to be able to get the data back so having having a way of replicating keys across geographies in a secure way on a very controlled environment between like three trusted people or something our team is a good way to do it then this is this concept of crypto officers versus procedures and you know just this is a
total eye chart but I there's actually some some kind of cool things they'll talk about that you know as we get into some of these third-party solutions that I think or need and actually one you can do is you can actually say you know maybe maybe the keys and this that you got to use this you got a threat water your application you got to understand what is your data what is your trying to protect what is the blast radius if this reach you may actually want to keep your keys on ground you may not want them in the cloud and so you can do things like say you know we we want to have a Gemalto or you know for that matter you know the other with as your a Telus HSM on ground and and we want to do our key management on ground we want to have our hot apps call for those keys that give us a little bit more control we act we can see what's happening we rack a little quicker we know there's you know we know we own the keys in there they were never up there so you know push comes to shove we can cut off access to it and that stuff's encrypted nobody can get at it but there are some kind of cool things you know if I've got my my key management on ground I'm going to the data center and I can love it and touch it and watch it's blinking why it's it's just neat it's cool and know that all is right in the universe and like he's protected in a very safe environment so you know that gives us also gives us a fallback you know in the cloud turns stormy and black and parts of it evaporate because of whatever we actually have our critical encryption keys we maintain control of them there are some kind of cool things we can do this as we start applying these third-party solutions to encryption problems so let's take a database everybody's you know how are we encrypted database you know you know running through a couple examples like you know if you use sequel server Enterprise last version you use transparent data encryption sounds super easy it is it's really easy it's turn your turn around just use and just works and your data is encrypted arrests which is pretty cool now there if you think about that threat model earlier and say you know well what are the implications is it start to analyze it well one thing now that that's given me is by using the Prarie version sequel server data encryption query data encryption transparent data encryption so I make a copy or if I make a backup of that database and throw it somewhere and leave it don't set access permissions to it that's actually encrypted so it keeps a person from getting at a database backup which is awesome now cloud introduces an interesting problem because you're on the prior version you know the with transparent data encryption is they make the ovm you know that's the whole running instance in the cloud if they do that you're kind of screwed because they got the encrypted data which is in the database and they got the key which is in the registry so if they got a copy snap the VM they had everything they need to reconstruct that which is it sucks sucks for you and so you don't want to talk you want to suck less so one of things you can do with the new sequel server Enterprise you can do ki offloading so you say I don't want to serve a community I want to store this strong key management system now this can be actually in the cloud or actually on ground and then with with solutions like with the Gemalto solution they take it a step further and they can say they can apply an encryption for instance so you say these sort of stored procedures get privileged access to be able to utilize this key for decryption so maybe I got a customer by lookup name or something and it has access to be able to get to this decryption key to this this key to actually perform this customer lookup and so I've got these store procedures that are defined in this application that can actually utilize this trusted connection to a strong key management and and use these keys for form operations now when when somebody when somebody does a somebody pops your app and they're doing a sequel injection select starred users or one equals one hopefully you didn't define that as a valid stored procedure just saying if you didn't that won't be one of the stored procedures that can be used and instead of vomiting up the unencrypted user table it will vomit up the encrypted data and the attackers got bupkis there's some other things too like with protect file I can do things like apply some extraordinarily fine grained permissions on files so exact these files that have is really important data in them and I don't want to be able to get out on and I can say this service account ID running this binary from this IP this machine can transparently read and write these files into that application it looks like they're decrypted but if I pop rune on the box and I my my shell was bad or whatever I've got nothing I just get I get that data back in an encrypted one so I mean those are some of the extended more deeper layers of encryption we can apply to stuff
so why would why should I manage my own keys I mean Emma's Amazon's got a thing they managed keys there are some standards bodies and some frameworks that say you know maybe we should be kind of hanging on more encryption keys you know this this is a good one high trust you know it has some verbage in it well you need to use validated cryptographic modules that's a kind of a no-brainer you need to store keys separate from the data and key management and key usage need to be separation of duties and he shall not be stored in the cloud there's also the new the newness that's the 850 3-5 which is a draft and I love the wine maintain exclusive control of cryptographic keys and remember when you're in the cloud you're running on someone else's computer your keys are up there and I kind of parse this because there's ways of keeping Amazon from getting at it but there's you're putting the keys someplace else where people that have access to that application potentially have access to it so it's kind of a complicated question about and it's not like Amazon gives away our keys but by provisioning an application to use those keys you can allow an attacker utilize them as well and a way different than you intended that application to work so you intended the application to a certain thing for people and he's using that same application to suck out all your data and sell it so again maintain an exclusive control of cryptographic keys I love that line and so if an application makes sense to use Amazon kms again you go look at your threat modeling your application what is the risk of the data you're storing up there there's there's there's a lot of cases was hey it makes sense to use kms this extra stuff I'm talking about just it doesn't fly it's not worth the expense the time the configuration there's a you know there there is this whole continuum of data risks you know some data is low risk somes high but you should use if you're using kms you should only use the FIPS 140-2 edge to certified endpoints they've got a table of them that's that's one of the things people screw up on is they don't realize that not all end points or FIPS 140-2 small certified you have to design your system and architect it so you've got a separation of duties and hopefully some using split keys kN she mirrors sharing secret is really cool but split up a key into eight parts so any four people can come together and rebuild that key so so no one person has all the data all the information needed to own own the thing and and you have the Marie got hit by a bus problem and then employ key usage monitoring alerting and responses so right AWS is best practices for using cam outs they actually say to do some things but nowhere does it actually say how to do it and this is this is really kind of this is the hard part you should be monitoring for data plane operations and control plane operations but like data plane operations quantitatively saying you know this application normally calls this decryption key 200 times an hour it just called it two thousand times in five minutes something very different happening so if I'm using those grants for instance I can actually detect that and say I know what's happening but I think a lot of data is leaving the building and you can actually flip that and revoke access to that key until you investigate to an incident response figure out hated with somebody just breaching me and at least stop the bleeding there's also control plane operations so somebody somebody say an attacker gets in and they want to start deleting some of your Sam caves I would argue you you should definitely know if something's happening to your cm KS you know that you know says delete key schedule key deletion it's kind of a big deal you know you do want to do that as part of normal key life cycle maintenance but that that is a big deal also you know building systems to do to
do this alerting it's really hard work you know I it's frustrating because you know people say well just use spelunking ship you know which is like that's not really an answer you know this is this is kind of a this is a really kind of a complex problem I guess you know my my approach I have a I have a girlfriend who has PhD in statistics it she's really awesome that figuring out this kind of stuff if I can tell her these are the things I'm kind of looking for that I think represent a problem and she helped me build you know this is the math this is how we'd apply a statistics solution to look for that and so I would advise all of you doing this stuff get a girlfriend a PhD in statistics I'm going to say that's uh you know I I want to produce some some additional stuff and you know this would be like a full-day workshop and several one-hour talk but there's there's kind of some principles on there
anyway encryption and key access controls you really need to design your plan I'm amazed at the number of devs that are you know when I analyze applications were made by third parties it's like you know where do you have the documentation of how you assign you know grants and an iamb policy in canvas policy here you know it's okay to all with stuff please do but do you have any documentation he said well no I guess the dev just did it until it work he's like that's I guarantee you that's gonna be a problem I've seen that in third-party apps which is suboptimal to say the least so you really need to build out the you know plan this build out those ion policies and Krypton usages and contexts and and if and and this really needs to happen any application design phase this this is not something that I can just swoop in and fix them stuff later on so in conclusion encrypting data in the cloud there's it's very complex and I just I just led you through just something really simple I want to put a thing in an s3 bucket you know there's all these different kinds of you know choices you have to make and there's there's no it's complex there's no magic answers and but encrypting data to actually protect it in the cloud is more than just a check box and you know we tell devs to never write their own crypto we've taught them that but now with the complexity of cloud and some of these encryption solutions a large number of design choices we need to embed with devs and we need to help them implement cloud cryptography architecture that's that's gonna be really critical I think that this is we're not going to get ahead of this problem unless we sit down with the devs and say let's let's talk through some of the aspects what we're trying to do and multiple completely different ways of encrypting something like a simple s3 bucket multiple ways of using kms or external key management so you need to think about the threat model that is that is so so so critical so we we want to make sure that attackers can't decrypt our data by virtue of standing in front of the door and turning the key we want to add some additional controls like that guard station authenticating authorize you know understand your authorization or monitoring we we have to engineer these cloud cryptography solutions properly to protect the data and and just to recap there is no magic crypto fairy dust that I can parachute in with at an at the end of it project and somehow sprinkle that stuff on there and secure an app it can't be done I wish I could like I'd be a millionaire but like you know I do have glitter but that's that's uh so anyway I'm not sure where I'm at on time it may be getting close is yeah we have about ten minutes left for questions if you have a question please come on up to the mic and if you don't feel comfortable we're recording this so if you'd rather not be recorded on the mic please approach me after the talk is over so we have 10 minutes come on up and first let's give a big hand to Marie for an awesome talk [Applause] [Applause]
Feedback