WEBVTT

00:00:03.214 --> 00:00:06.903
Requirement 3.4 in itself is pretty straightforward.

00:00:06.903 --> 00:00:10.740
PCI DSS prohibits you from storing plain text or

00:00:10.740 --> 00:00:14.281
unencrypted primary account numbers or PANs.

00:00:14.281 --> 00:00:17.516
Now personally, I would take this one step further,

00:00:17.516 --> 00:00:22.065
because my advice to all organizations is just not to store cardholder data,

00:00:22.065 --> 00:00:26.253
because if you don't store it, criminals cannot steal it; well,

00:00:26.253 --> 00:00:29.031
they can't steal it from datastores anyway.

00:00:29.031 --> 00:00:30.693
They could still steal it in memory, but you know,

00:00:30.693 --> 00:00:33.584
a big target for criminals is stored cardholder data.

00:00:33.584 --> 00:00:37.044
No stored cardholder data, people can't steal it from there,

00:00:37.044 --> 00:00:41.712
but remember, this is just my advice, it's not what the standard says.

00:00:41.712 --> 00:00:45.658
What the standard says is this; it's says that if you

00:00:45.658 --> 00:00:50.360
do store primary account numbers, you cannot store them in a plain text format.

00:00:50.360 --> 00:00:55.086
The exact wording of the requirement is that an organization has to

00:00:55.086 --> 00:00:59.876
render or make PANs unreadable wherever they are stored,

00:00:59.876 --> 00:01:03.377
and the standard offers four ways to make PANs unreadable.

00:01:03.377 --> 00:01:05.189
These are firstly,

00:01:05.189 --> 00:01:09.461
creating a one-way hash of the PAN using an

00:01:09.461 --> 00:01:10.733
industry-approved strong hashing algorithm.

00:01:10.733 --> 00:01:12.940
Secondly, truncating the PAN,

00:01:12.940 --> 00:01:18.062
which obscures all but the first six and last four digits.

00:01:18.062 --> 00:01:18.395
Thirdly,

00:01:18.395 --> 00:01:23.585
replacing PANs with tokens using a system that exchanges a token for a PAN.

00:01:23.585 --> 00:01:27.135
And then finally employing strong cryptography.

00:01:27.135 --> 00:01:29.205
If you're going to create a hash of the PAN,

00:01:29.205 --> 00:01:33.062
PCI DSS requires that the hash is of the entire PAN

00:01:33.062 --> 00:01:35.330
and not just the proportion of it,

00:01:35.330 --> 00:01:38.809
and that a recognized hashing algorithm is used.

00:01:38.809 --> 00:01:44.591
PCI DSS doesn't actually require a salt in the hashing process; however,

00:01:44.591 --> 00:01:45.664
look, this is strongly recommended,

00:01:45.664 --> 00:01:50.090
because there are so few PANs based on a 16-digit number that actually

00:01:50.090 --> 00:01:54.421
matches the sixteen-digit checksum that cards use that it's actually

00:01:54.421 --> 00:01:56.875
easy to create a rainbow table over them.

00:01:56.875 --> 00:01:58.725
So although the standard doesn't say it,

00:01:58.725 --> 00:02:00.964
you should have a salt when you hash PANs.

00:02:00.964 --> 00:02:05.461
PAN truncation is a complicated way of saying that a PAN is

00:02:05.461 --> 00:02:08.607
stored with some of the middle digits missing,

00:02:08.607 --> 00:02:11.926
the idea being that if somebody got hold of a truncated PAN,

00:02:11.926 --> 00:02:15.237
it could not be used for fraudulent transactions.

00:02:15.237 --> 00:02:17.308
And people often confuse truncation and masking.

00:02:17.308 --> 00:02:18.561
Remember, masking,

00:02:18.561 --> 00:02:23.462
which we looked at like a couple of clips ago is about

00:02:23.462 --> 00:02:25.816
not showing the full PAN on screen.

00:02:25.816 --> 00:02:29.323
Truncation is about not storing the full PAN.

00:02:29.323 --> 00:02:32.446
And a truncated PAN can contain as many as or it's the same as masking actually.

00:02:32.446 --> 00:02:35.590
It's the same as the first six and the last four digits of the real PAN,

00:02:35.590 --> 00:02:38.772
and the remaining five or six digits in the middle

00:02:38.772 --> 00:02:40.380
are stored replaced by asterisks.

00:02:40.380 --> 00:02:45.696
There's a really useful FAQ on the PCI SSE website that describes

00:02:45.696 --> 00:02:49.175
acceptable truncation formats for all of the different lengths of PANs

00:02:49.175 --> 00:02:51.483
you might encounter from each card brand.

00:02:51.483 --> 00:02:55.689
Tokenization replaces a PAN with a value that isn't a PAN.

00:02:55.689 --> 00:02:59.944
Tokens often keep the same structure and the same format as

00:02:59.944 --> 00:03:03.463
PANs so they can be used in systems that expect to see and

00:03:03.463 --> 00:03:06.333
store a sixteen-character field.

00:03:06.333 --> 00:03:08.288
And just like a truncated PAN,

00:03:08.288 --> 00:03:13.616
a token contains the real first six and last four digits of the original PAN.

00:03:13.616 --> 00:03:13.816
Typically,

00:03:13.816 --> 00:03:17.134
an organization will have a tokenization server or a tokenization

00:03:17.134 --> 00:03:20.883
appliance that exchanges PANs for tokens and also,

00:03:20.883 --> 00:03:25.774
you know, given the right security, can turn a token back into a PAN.

00:03:25.774 --> 00:03:26.424
The alternative,

00:03:26.424 --> 00:03:29.854
they'll use an external tokenization service provided by their processor,

00:03:29.854 --> 00:03:32.967
their acquirer or their merchant bank.

00:03:32.967 --> 00:03:34.455
Now here's something awesome.

00:03:34.455 --> 00:03:41.320
Truncation, hashing, and tokenization are magic as far as PCI DSS is concerned,

00:03:41.320 --> 00:03:44.334
because they turn a PAN into something that's not a PAN,

00:03:44.334 --> 00:03:49.698
and something that's not a PAN does not need to be protected by PCI DSS.

00:03:49.698 --> 00:03:51.768
Let me say that again.

00:03:51.768 --> 00:03:56.336
If you take a PAN and you hash it or truncate it or tokenize it,

00:03:56.336 --> 00:03:58.707
it is no longer a PAN,

00:03:58.707 --> 00:04:02.941
and the PCI DSS requirements apply to systems that

00:04:02.941 --> 00:04:05.024
store process or transmit PANs.

00:04:05.024 --> 00:04:11.633
PCI DSS does not apply to systems that do not store process or transmit PANs.

00:04:11.633 --> 00:04:13.052
On the other hand,

00:04:13.052 --> 00:04:16.143
the fourth option that requirement 3.4 offers to

00:04:16.143 --> 00:04:21.369
prevent storing plain text PANs, encryption is not magic,

00:04:21.369 --> 00:04:25.483
and this is really important, because people often get this wrong.

00:04:25.483 --> 00:04:30.093
As far as PCI DSS is concerned, an encrypted PAN is still a PAN,

00:04:30.093 --> 00:04:34.127
and it needs to be protected by the PCI DSS requirements.

00:04:34.127 --> 00:04:40.074
So systems that store encrypted PANs are fully in scope of PCI DSS.

00:04:40.074 --> 00:04:42.290
There are some rare exceptions to this,

00:04:42.290 --> 00:04:46.577
and the FAQs on the PCI SSC website are really useful here,

00:04:46.577 --> 00:04:48.912
but if you ever want to make an argument that

00:04:48.912 --> 00:04:53.706
encrypted PAN doesn't need protection, and you can in some circumstances do this,

00:04:53.706 --> 00:04:58.029
you really need to talk with an experienced QSA.

00:04:58.029 --> 00:05:00.633
If you are going to store encrypted PANs,

00:05:00.633 --> 00:05:04.233
you must use strong cryptography, which is defined in the PCI glossary,

00:05:04.233 --> 00:05:07.831
and essentially it means you should use a recognized,

00:05:07.831 --> 00:05:12.341
and to all intents and purposes this means a NIST-approved algorithm,

00:05:12.341 --> 00:05:17.382
a recognized algorithm of at least 112 bits of key strength.

00:05:17.382 --> 00:05:22.295
That 112 bits minimum requirement is actually there to allow people to

00:05:22.295 --> 00:05:26.331
continue to use an encryption algorithm called Triple DES,

00:05:26.331 --> 00:05:30.697
which is used extensively in some legacy bits of the payment ecosystem,

00:05:30.697 --> 00:05:32.553
but if you're designing something now,

00:05:32.553 --> 00:05:36.619
really 128 bits of key strength should be your minimum,

00:05:36.619 --> 00:05:39.054
so 128-bit AES effectively.

00:05:39.054 --> 00:05:41.475
To test an organization's compliance with the requirement 3.4,

00:05:41.475 --> 00:05:46.577
the QSA is going to look at all the places primary account numbers may be

00:05:46.577 --> 00:05:51.398
stored and validate there are no occurrences of plain text PANs.

00:05:51.398 --> 00:05:54.001
If encryptional tokenization is used, the QSA,

00:05:54.001 --> 00:05:54.485
yeah,

00:05:54.485 --> 00:05:58.685
they're also going to probably look at the vendor's documentation to

00:05:58.685 --> 00:06:03.805
understand how the tokenization system or the encryption works.

00:06:03.805 --> 00:06:04.325
Ah gosh,

00:06:04.325 --> 00:06:08.505
look; I could give a whole course on ways to encrypt tokenized and hashed PANs,

00:06:08.505 --> 00:06:10.369
so if you're thinking of storing a PAN,

00:06:10.369 --> 00:06:14.700
my advice is really to talk to an experienced QSA first.

00:06:14.700 --> 00:06:21.763
There's a further wrinkle to requirement 3.4, which I'm not a great fan of.

00:06:21.763 --> 00:06:25.954
Requirement 3.4 .1 says that if you're using whole disk

00:06:25.954 --> 00:06:28.991
encryption to protect PANs in accordance with 3.4,

00:06:28.991 --> 00:06:31.874
it should not be integrated with the same

00:06:31.874 --> 00:06:35.910
authentication system as the operating system.

00:06:35.910 --> 00:06:37.847
Let's unpick this requirement, and first off,

00:06:37.847 --> 00:06:42.012
I'm not going to have the debate about whether whole disk encryption really

00:06:42.012 --> 00:06:45.804
meets the intent of not storing plain text cardholder data here,

00:06:45.804 --> 00:06:49.531
but Jacob and I have a long discussion about it at the end of the module.

00:06:49.531 --> 00:06:53.635
What I am going to look at is what the standard says and why.

00:06:53.635 --> 00:06:59.287
So basically, if you use disk or partition encryption to meet requirement 3.4,

00:06:59.287 --> 00:07:01.484
but you encrypt PANs that are stored,

00:07:01.484 --> 00:07:05.000
this sub requirement says that the credentials to manage the

00:07:05.000 --> 00:07:07.786
encryption must be separate from the operating system,

00:07:07.786 --> 00:07:12.917
and you can see that this makes sense, because if I've authenticated to the OS,

00:07:12.917 --> 00:07:15.201
and that's also good enough for the disk encryption,

00:07:15.201 --> 00:07:19.119
merely logging into the operating system makes all

00:07:19.119 --> 00:07:21.665
stored cardholder data available to me.

00:07:21.665 --> 00:07:23.762
It's essentially plain text storage when

00:07:23.762 --> 00:07:26.844
authenticated user of the operating system.

00:07:26.844 --> 00:07:32.004
Now that's not really true when it comes to removal media or portable media,

00:07:32.004 --> 00:07:34.868
so like a USB disk or a portable drive where whole

00:07:34.868 --> 00:07:36.438
disk encryption is really good.

00:07:36.438 --> 00:07:37.881
To test this requirement,

00:07:37.881 --> 00:07:42.828
the QSA will look at how whole-disk or partition encryption is being set up,

00:07:42.828 --> 00:07:46.357
and make sure it's not tied to the operating system credentials.

00:07:46.357 --> 00:07:50.714
The QSA will also look at how the encryption works so

00:07:50.714 --> 00:07:59.951
the size of the algorithm used, and also the associated key management with it.
