C u s t o m c r y p t o p o l i c i e s b y e - - PowerPoint PPT Presentation

c u s t o m c r y p t o p o l i c i e s b y e x a m p l e
SMART_READER_LITE
LIVE PREVIEW

C u s t o m c r y p t o p o l i c i e s b y e - - PowerPoint PPT Presentation

C u s t o m c r y p t o p o l i c i e s b y e x a m p l e s T o m M r z P r i n c i p a l S W E n g i n e e r , R e d H a t 1 A G E N D A W h a t w e l l b


slide-1
SLIDE 1

1

C u s t

  • m

c r y p t

  • p
  • l

i c i e s b y e x a m p l e s

T

  • m

á š M r á z P r i n c i p a l S W E n g i n e e r , R e d H a t

slide-2
SLIDE 2

2

A G E N D A

W h a t w e ’ l l b e d i s c u s s i n g t

  • d

a y

M

  • t

i v a t i

  • n

C r y p t

  • p
  • l

i c i e s C u s t

  • m

c r y p t

  • p
  • l

i c i e s E x a m p l e s F u t u r e S u m m a r y

slide-3
SLIDE 3

3

M

  • t

i v a t i

  • n
slide-4
SLIDE 4

4

M

  • t

i v a t i

  • n

C r y p t

  • g

r a p h y a n d c r y p t a n a l y s i s g

  • h

a n d i n h a n d a n d t h e e v

  • l

u t i

  • n
  • f

a l g

  • r

i t h m s a n d p r

  • t
  • c
  • l

s i s f a s t e r a n d f a s t e r . Y

  • u

c a n n e v e r t h i n k t h a t a c r y p t

  • s

y s t e m d e p l

  • y

e d i n y e a r X w i l l b e s t i l l g

  • d

e n

  • u

g h i n y e a r X + 1 . W e n e e d t

  • g

e t u s e d t

  • c

h a n g e s .

slide-5
SLIDE 5

5

M

  • t

i v a t i

  • n
slide-6
SLIDE 6

6

M

  • t

i v a t i

  • n

bettercrypto.org

slide-7
SLIDE 7

7

M

  • t

i v a t i

  • n

W h a t i f y

  • u

n e e d t

  • a

p p l y t h e c r y p t

  • r

e l a t e d c

  • n

fi g u r a t i

  • n

c h a n g e s r e g u l a r l y t

  • h

u n d r e d s

  • f

m a c h i n e s p h y s i c a l a n d v i r t u a l i n h e t e r

  • g

e n

  • u

s e n v i r

  • n

m e n t ?

slide-8
SLIDE 8

8

M

  • t

i v a t i

  • n

T

  • c
  • m

p l i c a t e t h i n g s e v e n m

  • r

e – v a r i

  • u

s m a c h i n e s h a v e v a r i

  • u

s l e v e l s

  • f

n e e d t

  • c
  • m

m u n i c a t e w i t h l e g a c y s y s t e m s a n d d e v i c e s . E v e r y

  • n

e c a n n

  • t

a c c

  • m
  • d

a t e e v e r y c h a n g e .

slide-9
SLIDE 9

9

C r y p t

  • p
  • l

i c i e s

c

  • m

e t

  • r

e s c u e

slide-10
SLIDE 10

1

S y s t e m

  • w

i d e c r y p t

  • p
  • l

i c i e s c

  • m

e t

  • r

e s c u e

C r y p t

  • p
  • l

i c i e s

C e n t r a l l y m a n a g e d

  • n

t h e s y s t e m M u l t i p l e p r e

  • d

e s i g n e d p

  • l

i c y l e v e l s F I P S s u p p

  • r

t s i m p l i fi c a t i

  • n
slide-11
SLIDE 11

1 1

C e n t r a l l y m a n a g e d

  • n

t h e s y s t e m

C r y p t

  • p
  • l

i c i e s

S i n g l e c

  • m

m a n d

: update-crypto-policies --set <LEVEL>

slide-12
SLIDE 12

1 2

C e n t r a l l y m a n a g e d

  • n

t h e s y s t e m

C r y p t

  • p
  • l

i c i e s

C

  • n

t r

  • l

s

: G n u T L S O p e n S S L K e r b e r

  • s

5 B i n d N S S J a v a O p e n S S H c l i e n t O p e n S S H s e r v e r l i b s s h l i b r e s w a n

slide-13
SLIDE 13

1 3

C r y p t

  • p
  • l

i c i e s

W h e n t h e u p d a t e

  • c

r y p t

  • p
  • l

i c i e s c

  • m

m a n d i s r u n i t t r a n s f

  • r

m s a s i m p l e p

  • l

i c y d e fi n i t i

  • n

i n t

  • s

e p a r a t e c

  • n

fi g u r a t i

  • n

fi l e s n i p p e t s t h a t a r e l

  • a

d e d

  • r

i n c l u d e d i n t

  • d

e f a u l t c

  • n

fi g u r a t i

  • n

s

  • f

t h e s u p p

  • r

t e d b a c k e n d s .

slide-14
SLIDE 14

1 4

C r y p t

  • p
  • l

i c i e s

M u l t i p l e p r e

  • d

e s i g n e d p

  • l

i c y l e v e l s

L E G A C Y L e g a c y d e v i c e s i n t e r

  • p

e r a b i l i t y , R C 4 , 3 D E S > = 6 4 b i t s e c u r i t y D E F A U L T R e a s

  • n

a b l e b u t i n t e r

  • p

e r a b l e d e f a u l t > = 8 b i t s e c u r i t y N E X T F e d

  • r

a

  • n

l y e q u i v a l e n t

  • f

R H E L

  • 8

D E F A U L T R e mo v e s T L S

  • 1

. , 1 . 1 , r e q u i r e s D H > = 2 4 8 b i t s F U T U R E C

  • n

s e r v a t i v e l e v e l , n

  • S

H A 1 , 2 5 6 b i t c i p h e r s

  • n

l y > = 1 2 8 b i t s e c u r i t y F I P S F I P S a p p r

  • v

e d / a l l

  • w

e d a l g

  • r

i t h ms

  • n

l y > = 1 1 2 b i t s e c u r i t y

slide-15
SLIDE 15

1 5

S i m p l e c

  • m

m a n d t

  • e

n a b l e F I P S m

  • d

e

C r y p t

  • p
  • l

i c i e s

J u s t r u n

: fips-mode-set --enable reboot

slide-16
SLIDE 16

1 6

S i m p l e c

  • m

m a n d t

  • e

n a b l e F I P S m

  • d

e

C r y p t

  • p
  • l

i c i e s

R H E L 7 f

  • r

c

  • m

p a r i s

  • n

:

yum install dracut-fips dracut -f <your-favourite-command-to-edit-boot-cfg> reboot

slide-17
SLIDE 17

1 7

S y s t e m

  • w

i d e c r y p t

  • p
  • l

i c i e s c

  • m

e t

  • r

e s c u e

C r y p t

  • p
  • l

i c i e s

C e n t r a l l y m a n a g e d

  • n

t h e s y s t e m

S i n g l e c

  • m

m a n d c

  • n

t r

  • l

s a l l t h e c

  • r

e c r y p t

  • l

i b r a r i e s a n d a p p l i c a t i

  • n

s u s i n g c r y p t

  • .

M u l t i p l e p r e

  • d

e s i g n e d p

  • l

i c y l e v e l s

U p

  • t
  • d

a t e s e c u r i t y , c

  • m

m u n i c a t i

  • n

w i t h l e g a c y s y s t e m s , p r e p a r a t i

  • n

f

  • r

f u t u r e

F I P S s u p p

  • r

t

S i m p l i f y F I P S e n a b l e m e n t

W h e r e ?

C u r r e n t F e d

  • r

a a n d R e d H a t E n t e r p r i s e L i n u x 8

slide-18
SLIDE 18

1 8

C r y p t

  • p
  • l

i c i e s

B u t w h a t t

  • d
  • i

f t h e p r e

  • d

e fi n e d p

  • l

i c y l e v e l s d

  • n
  • t

m a t c h y

  • u

r r e q u i r e m e n t s ?

slide-19
SLIDE 19

1 9

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

c

  • m

e t

  • r

e s c u e

slide-20
SLIDE 20

2

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

D e fi n e y

  • u

r

  • w

n c r y p t

  • p
  • l

i c y f r

  • m

s c r a t c h O r m

  • d

i f y t h e e x i s t i n g p r e

  • d

e fi n e d p

  • l

i c y l e v e l s

slide-21
SLIDE 21

2 1

D e fi n i n g f u l l p

  • l

i c y f r

  • m

s c r a t c h

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

P l a c e m e n t

  • f

t h e f u l l p

  • l

i c y d e fi n i t i

  • n

fi l e s :

/etc/crypto-policies/policies /usr/share/crypto-policies/policies

T h e fi l e n e e d s t

  • b

e n a m e d < P O L I C Y > . p

  • l

( t h e u p p e r c a s e i n t h e fi l e n a m e i s i m p

  • r

t a n t ) .

slide-22
SLIDE 22

2 2

S i m p l e p

  • l

i c y d e fi n i t i

  • n

f

  • r

m a t

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

S e e c r y p t

  • p
  • l

i c i e s ( 7 ) m a n u a l p a g e f

  • r

a l l t h e k e y a n d a l g

  • r

i t h m n a m e s

:

hash = SHA2-256 SHA2-384 SHA2-512 \ SHA3-256 SHA3-384 SHA3-512 SHA2-224 group = X25519 X448 SECP256R1 SECP384R1 \ SECP521R1 FFDHE-3072 FFDHE-4096 FFDHE-6144 \ FFDHE-8192 min_tls_version = TLS1.2 min_rsa_size = 3072

e x c e r p t f r

  • m

/ u s r / s h a r e / c r y p t

  • p
  • l

i c i e s / p

  • l

i c i e s / F U T U R E . p

  • l
slide-23
SLIDE 23

2 3

M

  • d

i fi c a t i

  • n
  • f

e x i s t i n g p

  • l

i c i e s b y p

  • l

i c y m

  • d

i fi e r m

  • d

u l e s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

P l a c e m e n t

  • f

t h e p

  • l

i c y m

  • d

i fi e r fi l e s :

/etc/crypto-policies/policies/modules /usr/share/crypto-policies/policies/modules

T h e m

  • d

u l e fi l e n e e d s t

  • b

e n a m e d < M O D U L E > . p m

  • d

( t h e u p p e r c a s e i n t h e fi l e n a m e i s a g a i n i m p

  • r

t a n t ) .

slide-24
SLIDE 24

2 4

P

  • l

i c y m

  • d

i fi e r s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

D i s a b l e S H A 1 h a s h

:

hash = -SHA1 sign = -RSA-PSS-SHA1 -RSA-SHA1 -ECDSA-SHA1

/ u s r / s h a r e / c r y p t

  • p
  • l

i c i e s / p

  • l

i c i e s / m

  • d

u l e s / N O

  • S

H A 1 . p m

  • d

T h e h a s h v a l u e a f f e c t s

  • t

h e r u s e t h a n s i g n a t u r e s .

slide-25
SLIDE 25

2 5

H

  • w

t

  • a

p p l y i t ?

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

G e n e r a t e a n d s e t t h e c u s t

  • m

i z e d p

  • l

i c y :

update-crypto-policies --set DEFAULT:NO-SHA1 A n y p

  • l

i c y m

  • d

i fi e r m

  • d

u l e c a n b e a p p l i e d t

  • t

h e r p

  • l

i c i e s a s w e l l .

slide-26
SLIDE 26

2 6

H

  • w

t

  • a

p p l y i t ?

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

G e n e r a t e a n d s e t t h e c u s t

  • m

i z e d p

  • l

i c y :

update-crypto-policies --set FUTURE:NO-SHA1 S

  • t

h i s c a n b e u s e d a s w e l l , a l t h

  • u

g h i t w

  • u

l d n

  • t

b e t

  • u

s e f u l .

slide-27
SLIDE 27

2 7

P

  • l

i c y m

  • d

i fi e r s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

E n a b l e C a m e l l i a c i p h e r s w i t h p r i

  • r

i t y t

  • t

h e m

:

tls_cipher = +CAMELLIA-128-CBC +CAMELLIA-128-GCM \ +CAMELLIA-256-CBC +CAMELLIA-256-GCM cipher = +CAMELLIA-128-CBC +CAMELLIA-128-GCM \ +CAMELLIA-256-CBC +CAMELLIA-256-GCM

Y

  • u

c a n p u t t h i s fi l e f

  • r

e x a m p l e i n t

  • /

e t c / c r y p t

  • p
  • l

i c i e s / p

  • l

i c i e s / m

  • d

u l e s / C A M E L L I A . p m

  • d
slide-28
SLIDE 28

2 8

P

  • l

i c y m

  • d

i fi e r s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

E n a b l e C a m e l l i a c i p h e r s b u t l e a v e t h e m l a s t

:

tls_cipher = CAMELLIA-256-GCM+ CAMELLIA-256-CBC+ \ CAMELLIA-128-GCM+ CAMELLIA-128-CBC+ cipher = CAMELLIA-256-GCM+ CAMELLIA-256-CBC+ \ CAMELLIA-128-GCM+ CAMELLIA-128-CBC+

slide-29
SLIDE 29

2 9

P

  • l

i c y m

  • d

i fi e r s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

D i s a b l e

  • l

d T L S p r

  • t
  • c
  • l

v e r s i

  • n

s :

protocol = -TLS1.1 -TLS1.0 -DTLS1.0 min_tls_version = TLS1.2 min_dtls_version = DTLS1.2

S

  • m

e b a c k

  • e

n d s d

  • n
  • t

a l l

  • w

d i s a b l i n g p r

  • t
  • c
  • l

v e r s i

  • n

s s e l e c t i v e l y . T h e m i n _ t l s _ v e r s i

  • n

v a l u e a p p l i e s t

  • t

h e m .

slide-30
SLIDE 30

3

P

  • l

i c y m

  • d

i fi e r s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

A l l

  • w

s m a l l e r D H p a r a m e t e r s a n d R S A k e y s i n F U T U R E p

  • l

i c y :

# Parameter sizes min_dh_size = 2048 min_rsa_size = 2048

slide-31
SLIDE 31

3 1

P

  • l

i c y m

  • d

i fi e r s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

A l l

  • w
  • n

l y E C D H E a n d E C D H E w i t h P S K k e y e x c h a n g e s :

key_exchange = -RSA -DHE -DHE-RSA -PSK -DHE-PSK

U n f

  • r

t u n a t e l y t h e c u r r e n t v e r s i

  • n

d

  • e

s n

  • t

a l l

  • w

c

  • m

p l e t e l y

  • v

e r r i d i n g a p a r t i c u l a r l i s t v a l u e i n p

  • l

i c y m

  • d

i fi e r m

  • d

u l e .

slide-32
SLIDE 32

3 2

P

  • l

i c y m

  • d

i fi e r s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

A l l

  • w
  • n

l y E C D H E a n d E C D H E w i t h P S K k e y e x c h a n g e s :

key_exchange = ECDHE ECDHE-PSK

S

  • t

h i s w

  • u

l d n

  • t

w

  • r

k p r

  • p

e r l y c u r r e n t l y .

slide-33
SLIDE 33

3 3

P

  • l

i c y m

  • d

i fi e r s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

M u l t i p l e m

  • d

i fi e r s c a n b e a p p l i e d :

update-crypto-policies --set DEFAULT:NO-SHA1:CAMELLIA

slide-34
SLIDE 34

3 4

C

  • n

fi g u r e

  • t

i m e g e n e r a t i

  • n
  • f

b a c k

  • e

n d c

  • n

fi g u r a t i

  • n

s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

T h e b a c k

  • e

n d c

  • n

fi g u r a t i

  • n

fi l e s i n / e t c / c r y p t

  • p
  • l

i c i e s / b a c k

  • e

n d s a r e g e n e r a t e d w h e n u p d a t e

  • c

r y p t

  • p
  • l

i c i e s i s b e i n g r u n . T h i s a l l

  • w

s m

  • d

i f y i n g t h e c r y p t

  • l

i b r a r i e s a n d /

  • r

t h e c

  • n

fi g u r a t i

  • n

g e n e r a t

  • r

s i n r e g a r d s t

  • t

h e s u p p

  • r

t e d a l g

  • r

i t h m s . E v e n c

  • m

p l e t e l y n e w b a c k

  • e

n d s c

  • u

l d b e a d d e d i n f u t u r e a n d t h e p

  • l

i c y w i l l b e s t i l l a p p l i e d t

  • t

h e m w i t h

  • u

t n e e d f

  • r

m

  • d

i fi c a t i

  • n

.

slide-35
SLIDE 35

3 5

C

  • n

fi g u r e

  • t

i m e g e n e r a t i

  • n
  • f

b a c k

  • e

n d c

  • n

fi g u r a t i

  • n

s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

E x a m p l e : O p e n S S L b a c k

  • e

n d c

  • u

l d a l l

  • w

m

  • r

e fi n e

  • g

r a i n e d c

  • n

fi g u r a t i

  • n
  • f

T L S s i g n a t u r e a l g

  • r

i t h m s i n f u t u r e u p d a t e . O r i t c

  • u

l d a l l

  • w

d i f f e r e n t b e h a v i

  • r

i n r e g a r d s t

  • S

H A 1 s i g n a t u r e s i n T L S p r

  • t
  • c
  • l

v s . c e r t i fi c a t e s i g n a t u r e s .

slide-36
SLIDE 36

3 6

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

C u s t

  • m

c r y p t

  • p
  • l

i c i e s

D e fi n e y

  • u

r

  • w

n c r y p t

  • p
  • l

i c y f r

  • m

s c r a t c h

I n a s i m p l e p

  • l

i c y d e fi n i t i

  • n

fi l e

O r m

  • d

i f y t h e e x i s t i n g p r e

  • d

e fi n e d p

  • l

i c y l e v e l s

B y a d d i n g

  • r

r e m

  • v

i n g e n a b l e d a l g

  • r

i t h m s

  • r

p r

  • t
  • c
  • l

s

G e n e r a t i

  • n
  • f

b a c k

  • e

n d c

  • n

fi g u r a t i

  • n

s

W h e n u p d a t e

  • c

r y p t

  • p
  • l

i c i e s i s r u n .

slide-37
SLIDE 37

3 7

F u t u r e

slide-38
SLIDE 38

3 8

W h a t ' s i n t h e w

  • r

k s ?

F u t u r e

H a n d l i n g

  • f

S H A 1 d e p r e c a t i

  • n

A f t e r t h e r e c e n t c

  • l

l i s i

  • n

a t t a c k i m p r

  • v

e m e n t s t h e S H A 1 u s e r e a l l y n e e d s t

  • b

e a b a n d

  • n

e d .

M

  • r

e fi n e

  • g

r a i n e d b a c k

  • e

n d c

  • n

fi g u r a t i

  • n

s

G n u T L S a l r e a d y i m p r

  • v

e d , O p e n S S L s h

  • u

l d f

  • l

l

  • w

.

C r y p t

  • p
  • l

i c i e s a n d d a t a a t r e s t

W e n e e d t

  • t

h i n k a b

  • u

t t h i s .

slide-39
SLIDE 39

3 9

S u m m a r y

slide-40
SLIDE 40

4

C r y p t

  • p
  • l

i c i e s s i m p l i f y m a n a g e m e n t

  • f

c r y p t

  • n

s y s t e m w i t h c u s t

  • m

c r y p t

  • p
  • l

i c i e s a l l

  • w

i n g a d j u s t m e n t s a c c

  • r

d i n g t

  • y
  • u

r n e e d s

S u m m a r y

S i n g l e c

  • m

m a n d t

  • r

u l e t h e m ( a l g

  • r

i t h m s a n d l i b r a r i e s ) a l l M u l t i p l e p r e

  • d

e s i g n e d p

  • l

i c y l e v e l s C u s t

  • m

p

  • l

i c i e s c a n b e c r e a t e d f r

  • m

s c r a t c h

  • r

b y p

  • l

i c y m

  • d

i fi c a t i

  • n

S i m p l e p

  • l

i c y d e fi n i t i

  • n

f

  • r

m a t

slide-41
SLIDE 41

C O N F I D E N T I A L D e s i g n a t

  • r

l i n k e d i n . c

  • m

/ c

  • m

p a n y / r e d

  • h

a t y

  • u

t u b e . c

  • m

/ u s e r / R e d H a t V i d e

  • s

f a c e b

  • k

. c

  • m

/ r e d h a t i n c t w i t t e r . c

  • m

/ R e d H a t

4 1

T h a n k y

  • u

h t t p s : / / g i t l a b . c

  • m

/ r e d h a t

  • c

r y p t

  • /

f e d

  • r

a

  • c

r y p t

  • p
  • l

i c i e s