# VIA Padlock not working? Or i'm missing something?

## Syster

Hi all!

I have a VIA C7 CPU, with Padlock technology built-in:

```
processor   : 0

vendor_id   : CentaurHauls

cpu family   : 6

model      : 9

model name   : VIA Nehemiah

stepping   : 8

cpu MHz      : 532.000

cache size   : 64 KB

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 1

wp      : yes

flags      : fpu vme de pse tsc msr cx8 sep mtrr pge cmov pat mmx fxsr sse rng rng_en ace ace_en

```

It seems that my kernel detects fine, and uses padlock correctly:

```
[  896.579854] padlock_aes: Using VIA PadLock ACE for AES algorithm.
```

Also, OpenSSL has a padlock engine built-in:

```

Server ~ # openssl engine padlock

(padlock) VIA PadLock (no-RNG, ACE)

```

Seems that everything should be working. But i think, something's wrong:

```
openssl speed -evp aes-256-ecb -engine padlock

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes

aes-256-ecb      38401.84k    99447.52k   171180.07k   228496.46k   271419.10

```

It doesn't even have any difference when i use padlock engine and default engine, or even when i load or not kernel padlock module;/

```
openssl speed -evp aes-256-ecb -engine padlock

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes

aes-256-ecb      38431.90k    99394.41k   171558.18k   227793.27k   271534.56k

```

Comparing to https://forums.gentoo.org/viewtopic-t-554289-start-0.html, its way too slow.

Do anyone had an experience in padlock?

PS: Tested with fresh OpenSSL-1.0.0g from portage.

----------

## Syster

Finally, i've solved problem. It was soo simple  :Smile: 

I've just forget to add path to padlock engine library in openssl configuration:

```

[openssl_engines]

#padlock = padlock_engine

[padlock_engine]

default_algorithms = ALL

[b]dynamic_path = /usr/lib/engines/libpadlock.so[/b]

init = 1

```

----------

