1
00:00:00.05 --> 00:00:02.06
- [Instructor] The Java
cryptography architecture

2
00:00:02.06 --> 00:00:05.08
is really the heart and
soul of Java encryption,

3
00:00:05.08 --> 00:00:10.03
decryption, hashing,
secure random, and a myriad

4
00:00:10.03 --> 00:00:14.03
of other engines that allow us
to do cryptographic functions

5
00:00:14.03 --> 00:00:17.06
with the Java programming language.

6
00:00:17.06 --> 00:00:22.02
Like much of Java, it
provides a standard API.

7
00:00:22.02 --> 00:00:25.09
Now it's designed to allow JRE providers

8
00:00:25.09 --> 00:00:28.05
to create their own implementation

9
00:00:28.05 --> 00:00:31.06
of the architecture itself.

10
00:00:31.06 --> 00:00:34.03
Essentially, the architecture
provides the engines

11
00:00:34.03 --> 00:00:38.05
and the API, and each
individual JRE provider

12
00:00:38.05 --> 00:00:42.04
can create their own
specific implementation

13
00:00:42.04 --> 00:00:46.07
based on the algorithms
that they wish to support.

14
00:00:46.07 --> 00:00:50.03
Again, it provides a standard engine API

15
00:00:50.03 --> 00:00:53.03
of supported operations, and this is key

16
00:00:53.03 --> 00:00:56.05
when you start dealing with
multiple providers at once,

17
00:00:56.05 --> 00:01:01.04
because each provider may
implement different operations

18
00:01:01.04 --> 00:01:05.04
but all of them conform to the same API.

19
00:01:05.04 --> 00:01:10.01
The provider structure,
or SPI, as this entails

20
00:01:10.01 --> 00:01:14.04
within Java allows each
provider to be on the class path

21
00:01:14.04 --> 00:01:16.01
at the same time.

22
00:01:16.01 --> 00:01:20.05
Again, JCA provides pure
API, and the various

23
00:01:20.05 --> 00:01:23.03
implementations or providers provide

24
00:01:23.03 --> 00:01:26.03
their specific algorithms.

25
00:01:26.03 --> 00:01:29.09
Providers can vary on the
algorithms that they support.

26
00:01:29.09 --> 00:01:33.05
They can support the same
or different algorithms

27
00:01:33.05 --> 00:01:37.05
and sometimes they do
that at the same time.

28
00:01:37.05 --> 00:01:41.01
Providers vary by JRE vendor as well,

29
00:01:41.01 --> 00:01:43.05
and there's also third-party providers

30
00:01:43.05 --> 00:01:46.03
that you may get exposed to.

31
00:01:46.03 --> 00:01:48.06
Now, I just kind of
want to give a structure

32
00:01:48.06 --> 00:01:53.01
of how the JCA works with
your application code.

33
00:01:53.01 --> 00:01:56.06
So as a developer, you're
writing an application

34
00:01:56.06 --> 00:01:59.07
in which you want to do
cryptographic functions.

35
00:01:59.07 --> 00:02:04.06
So you consume the API of the JCA.

36
00:02:04.06 --> 00:02:09.00
During runtime, the JRE
that is actually executing

37
00:02:09.00 --> 00:02:12.04
your byte code has one or more providers

38
00:02:12.04 --> 00:02:18.01
that provide the implementation
that the JCA APIs expose.

39
00:02:18.01 --> 00:02:21.02
And as such, the developer
does not necessarily

40
00:02:21.02 --> 00:02:25.03
need to know the provider that
is providing the algorithm.

41
00:02:25.03 --> 00:02:28.01
They simply need to know
that that algorithm exists

42
00:02:28.01 --> 00:02:30.07
on the class path at runtime.

