WEBVTT

0
00:01.280 --> 00:08.810
Let's dive deeper into steganography and to see how an image can embed another file, without destroying

1
00:08.840 --> 00:13.730
the original one or without anything being noticed.

2
00:13.730 --> 00:17.300
An image is composed of pixels.

3
00:17.630 --> 00:24.710
Let's take for example an RGB image, sometimes referred to as a true color image.

4
00:24.710 --> 00:33.650
The color of each pixel is determined by the combination of red, green and the blue intensities stored

5
00:33.770 --> 00:35.480
in each pixel.

6
00:35.480 --> 00:40.340
For example this is the RGB code of this color

7
00:43.040 --> 00:47.650
and the RGB code of this one. RGB

8
00:47.660 --> 00:57.850
images are stored as 24-bit images where the red, green and blue components are 8-bit each. 

9
00:57.900 --> 01:06.590
This yields a potential of 16 million colors. Usually using an image processing application

10
01:06.590 --> 01:14.600
you can see each pixel’s color as  3 numbers in base 10, between 0 and 255.

11
01:15.230 --> 01:18.560
These are the numbers for this color

12
01:18.650 --> 01:26.330
they are 255, 0 and 102. For this one

13
01:26.370 --> 01:29.200
the red intensity is 51, 

14
01:29.280 --> 01:40.670
green is 204 and the blue 255. These are the red, green and the blue components.

15
01:40.720 --> 01:50.800
Note that an 8 bit number is between decimal 0 when all beats are zero and the decimal 255 when all

16
01:50.800 --> 01:52.650
beats are 1.

17
01:52.750 --> 01:57.790
These are some examples of colors and they are RGB code.

18
01:57.790 --> 02:07.030
Note that you can also represent them in hexadecimal if you simply convert these numbers to base 16.

19
02:07.050 --> 02:10.390
This is the hexadecimal code of this color.

20
02:12.310 --> 02:22.070
Let's write to the RGB code of color orange! This code! So color orange

21
02:22.420 --> 02:29.870
RGB 255 , 153 and a 0.

22
02:29.870 --> 02:31.650
This is its code.

23
02:31.650 --> 02:37.370
Now let's convert these values to binary or base 2.

24
02:37.410 --> 02:50.610
This is a very simple operation but I'll use this online tool; so from decimal to binary 255 -

25
02:50.900 --> 02:54.470
-this is the binary number - and I'll copy paste it here.

26
02:56.730 --> 03:05.330
Then we have 153.

27
03:05.460 --> 03:15.600
I'll take the binary number and 0 which means 8 bits of zero 4 6 8.

28
03:16.080 --> 03:22.420
Okay, this is the color orange in binary.

29
03:22.540 --> 03:23.900
Perfect!

30
03:23.920 --> 03:32.770
Now this is a term called the "least significant beat" or LSB of any byte and is the right-most

31
03:32.770 --> 03:35.330
bit. This right

32
03:35.360 --> 03:38.910
most one is the least significant bit.

33
03:39.140 --> 03:46.880
This one! This one for the second bite and this 0 for the last byte.

34
03:47.170 --> 03:55.750
Now in the context of steganography the secret file will be hidden by manipulating and storing information

35
03:56.050 --> 04:04.910
in the least significant bits of the image or the sound file; if a user manipulates the least significant

36
04:04.910 --> 04:14.580
bits of a color in a pixel the effect will be so small on the amount of that color that the human naked

37
04:14.580 --> 04:17.570
eye will not perceive it at all.

38
04:17.570 --> 04:26.810
However the more bits a user replaces the more obvious the alteration will appear to both a statistical

39
04:26.870 --> 04:30.270
and visual inspection. Let's

40
04:30.270 --> 04:36.660
suppose we want to embed 3 bits 1, 0 and 1 in this pixel.

41
04:40.340 --> 04:51.260
1, 0 and 1 so the resulting pixel will be this 1.

42
04:51.270 --> 04:52.620
Here is 1.

43
04:52.800 --> 04:54.510
Here I'll put 0,

44
04:54.630 --> 04:57.180
the second bit and 1

45
04:59.930 --> 05:03.380
So the new RGB code of the color will be

46
05:06.320 --> 05:11.910
the first byte will remain 255, okay.

47
05:11.940 --> 05:14.340
Let's see the value of the second byte!

48
05:17.050 --> 05:20.620
Now I'm converting from binary to decimal.

49
05:20.800 --> 05:26.380
This is the binary number and it's 152 in decimal, in base

50
05:26.380 --> 05:26.620
10.

51
05:31.180 --> 05:33.190
And the last one will be 1.

52
05:39.440 --> 05:47.570
The user may later recover the secret information by extracting the least significant bits of the manipulated

53
05:47.600 --> 05:50.910
pixel and recovery the original message.

54
05:50.930 --> 05:53.660
Let's see how this new color looks like!

55
05:59.750 --> 06:01.660
This was the original color,

56
06:01.700 --> 06:06.960
this one, and the new color is this one.

57
06:06.960 --> 06:16.580
It's the same color for the human naked eye. By the way if you modify the least significant bit it means

58
06:16.640 --> 06:25.640
you modify one bit in every group of eight bits and that means 1 divided by 8 or 12,

59
06:25.700 --> 06:35.680
5% so in an image of one megabyte you could embed a file of 125 kilobytes.

60
06:36.520 --> 06:43.870
In practice steganography tools will allow you to embed the much less information in order not to be

61
06:43.870 --> 06:44.580
detected.

62
06:45.360 --> 06:49.260
Okay, that was the theoretical part of steganography.

63
06:49.480 --> 06:57.190
Of course each tool can use a different algorithm or variation of more algorithms but the fundamentals

64
06:57.280 --> 06:59.310
are the same.

65
06:59.380 --> 07:04.540
They have to modify the cover file in such a way that no one can detect it.

66
07:04.540 --> 07:09.490
I wanted you to deeply understand how it works! In the next lecture

67
07:09.760 --> 07:14.310
I'll show you a some hands on applications of steganography.

68
07:14.350 --> 07:16.000
See you in a few seconds.