Tải bản đầy đủ (.pdf) (82 trang)

TOÀN VĂN KỶ YẾU HỘI NGHỊ Conference Proceeding Fulltext.

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (4.31 MB, 82 trang )

ĐẠI HỌC QUỐC GIA TP. HỒ CHÍ MINH
TRƯỜNG ĐẠI HỌC KHOA HỌC TỰ NHIÊN

ISBN: 978-604-82-1375-6

TOÀN VĂN KỶ YẾU HỘI NGHỊ
Conference Proceeding Fulltext

TP. HCM – 21/11/2014
www.hcmus.edu.vn


TOÀN VĂN BÁO CÁO NÓI
ORAL
Tiểu ban ĐIỆN TỬ - VIỄN THÔNG


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
VIII-O-1

XÂY DỰNG THUÂT TOÁN NHẬN DIỆN ĐẶC TRƯNG SINH TRẮC HỌC LÒNG BÀN TAY
PALMPRINT TRÊN NỀN TẢNG DI ĐỘNG
Nguyễn Duy Thiên, Trần Hoàng Đạt, Bùi Trọng Tú
Trường Đại Học Khoa Học Tự Nhiên, ĐHQG-HCM
TÓM TẮT
Chứng thực cá nhân là một yếu tố quan trọng trong cuộc sống của chúng ta. Để vượt qua những
khó khăn của những phương pháp chứng thực thông thường, chứng thực sinh trắc học đã được phát
triển và sử dụng những yếu tố cơ bản của con người. Trong bài báo này, nhóm tác giả phát triển một
ứng dụng phần mềm chứng thực palmprint trên nền tảng di động. Quá trình chứng thực có 4 bước: lấy
mẫu dữ liệu, tiền xử lý tín hiệu, rút trích đặc trưng và đối sánh. Một bộ lọc Gabor 2 chiều được sử
dụng để thu được thông tin kết cấu sau đó 2 hình ảnh palmprint được đối sánh bằng khoảng cách


Hamming. Kết quả chứng thực được kiểm tra trên 14 người và mỗi người chụp 4 hình ảnh palmprint.
Bên cạnh đó, ứng dụng phần mềm cũng đạt được hiệu suất tốt với FAR 0% và FRR 2.66% ở thế
ngưỡng 0.7.
Từ khoá: FRR, FAR, ROI
GIỚI THIỆU
Điện thoại di động trong những năm gần đây đã có sự phát triển rất nhanh chóng và trở thành thiết bị
không thể thay thế trong các hoạt động thường ngày của con người bao gồm các công việc như xử lý thư điện tử
(Email), lưu các dữ liệu quan trọng, thanh toán trực tuyến v.v.. Với tầm quan trọng của điện thoại di động trong
cuộc sống thì vấn đề bảo mật trên điện thoại di động rất cần thiết được quan tâm và nghiên cứu. Một trong
những vấn đề luôn được quan tâm nhất bên ngoài tính năng giải trí quan trọng nhất trên điện thoại di động đó là
chứng thực cá nhân. Từ những năm 70 trở lại đây [1], đã có rất nhiều thiết bị hoặc hệ thống được sản xuất và sử
dụng công nghệ sinh trắc học để chứng thực cá nhân. Năm 1970, hệ thống có tên Identimat có chức năng ghi lại
kích thước bàn tay trở thành hệ thống đầu tiên được thương mại hóa. Tháng 9 năm 2013, công ty Apple giới
thiệu thiết bị Touch ID tích hợp trên Iphone 5S sử dụng công nghệ chứng thực dấu vân tay. Những thiết bị và hệ
thống ở trên có những ưu điểm vượt trội hơn các cách bảo mật thông thường. Nhưng vẫn còn tồn tại một số
nhược điểm như dấu vân tay dễ bị thay đổi do những tác động vật lý từ môi trường sống và khi con người được
sinh ra đôi khi dấu vân tay cũng không rõ ràng khiến cho việc chứng thực dễ bị sai. Chính vì những hạn chế của
chứng thực dấu vân tay mà các nhà nghiên cứu đã chuyển hướng và tập trung nghiên cứu vào công nghệ chứng
thực lòng bàn tay. Trong báo cáo này, nhóm tác giả sẽ xây dựng thuật toán nhận dạng đặc trưng sinh trắc học
lòng bàn tay trên nền tảng điện thoại di động thông minh dựa trên thuật toán phân tích đặc trưng lòng bàn tay
trên hình ảnh độ phân giải thấp phục vụ cho chứng thực cá nhân do Wai Kin Kong, David Zhang [2] phát triển.
Mặc dù thuật toán gốc đã đạt được những yêu cầu cơ bản cho việc chứng thực cá nhân, nhưng mới chỉ được sử
dụng cho các hình ảnh được chụp bởi các hệ thống máy chụp ảnh CCD cố định, chính điều này làm cho thuật
toán chưa được linh động như mong muốn và thu hẹp phạm vi áp dụng thuật toán. Chính những khuyết điểm
được liệt kê ở trên đã làm động lực để nhóm tác giả cải thiện thuật toán gốc tốt hơn và dựa trên những cải tiến
này sẽ xây dựng một thuật toán mới sử dụng trên điện thoại di động thông minh.

Hình 1. Các tầng trong hệ thống sinh trắc học
ISBN: 978-604-82-1375-6


3


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
THIẾT KẾ HỆ THỐNG
Sơ đồ khối tổng quát của hệthống được trình bày trong hình 2. Hệ thống có chức năng thiết lập mã số cho
người dùng mới và nhận diện đối với người dùng đã có mẫu dữ liệu tồn tại trong cơ sở dữ liệu của hệ thống. Hệ
thống lấy mẫu bằng máy chụp hình của điện thoại di động và xử lý mẫu dữ liệu bằng chính vi xử lý có sẵn trên
điện thoại. Hệ thống nhận diện được nhóm tác giả thực hiện trên hai ngôn ngữ lập trình là : Java và Matlab .
Nhóm tác giả sử dụng Matlab trên máy tính để thực hiện việc đánh giá cũng như tìm thế ngưỡng tối ưu cho
thuật toán.Sau đó nhóm tác giả sử dụng thế ngưỡng tối ưu của thuật toán để thực hiện ứng dụng trên HTC JOne
dùng JAVA.

Hình 2. Sơ đồ mô tả hệ thống nhận diện và lấy mẫu
THUẬT TOÁN TIỀN XỬ LÝ
Trước khi ảnh đầu vào trải qua giai đoạn rút trích đặc trưng, hình ảnh đầu vào cần phải trải qua quá trình
tiền xử lý. Quá trình tiền xử lý trải qua 5 bước chính.
Bước 1:ảnh đầu vào được chuyển thành ảnh xám với giá trị mức xám trải dài từ 0 đến 255. Sau đó, ảnh
xám được làm mờ bằng một bộ lọc thấp qua Gaussian. Dựa vào lược đồ xám của ảnh (Histogram) và lý thuyết
thế ngưỡng Otsu, ta sẽ tính toán được thế ngưỡng 𝑇𝑝 để chuyển đổi ảnh xám thành ảnh nhị phân. Việc chuyển
đổi này sẽ được biểu diễn như sau [3] :

 1 , G  x, y  * L  x, y   Tp
B  x, y   
0 , G  x, y  * L  x, y   Tp
Trong đó,

G  x, y  là mẫu ảnh đầu vào đã được chuyển đổi sang mức xám và L  x, y 

là lọc thấp qua


Gaussian,“*” là phép nhân chập 2 chiều.

ISBN: 978-604-82-1375-6

4


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM

(a)

(b)

Hình 3. (a) ảnh đầu vào sau khi qua lọc Gaussian, (b) ảnh xám sau khi nhị phân hóa
Bước 2 : rút trích biên của các lỗ giữa các ngón tay sử dụng lý thuyết vạch đường biên, sau đó ta sẽ thu
được tập hợp điểm biên nằm trong các lỗ Fi x j Fi y j với (i  [1 , 3], j  [2 , n]). Điểm bắt đầu Sk
thúc

 x,2 và kết

Ek  x,2 của từng lỗ sẽ được đánh dấu bằng cách sau [4] :

 x , B  xB , 2   0
S k  x, 2    B
 0 , B  xB , 2   1

k  1,3

 x , B  xB , 2   1

Ek  x, 2    B
 0 , B  xB , 2   0

k  1,3

Hình 4. Điểm bắt đầu và điểm kết thúc của mỗi lỗ được đánh dấu
ISBN: 978-604-82-1375-6

5


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM

Bước 3 : Tính toán điểm trung tâm 𝐶𝑘 (𝑥, 𝑦)của mỗi lỗ bằng các phương trình sau :


C x

M i 


C y

M i 

k

k

j 1


Fi x j

M i 
j 1

Fi y j

M i 

k  1,3

k  1,3

Trong đó, M(i) là tổng số điểm đường biên của mỗi lỗ. Sau đó, dựng một đường thẳng đi qua điểm

Ck  x, y 

Mk  x,2 của hai tọa độ Sk  x,2 , Ek  x,2 . Đường thảng đi qua hai điểm

và điểm trung bình

này có dạng:

yx

 Ck y  2

 2Ck x  M k xCk y 
 Ck x  M k x 

Ck x  M k x 


[3.1-1]

Dựa vào 3 đường thẳng này ta sẽ tìm được tọa độ của ba điểm K1 , K 2 , K3 là điểm thuộc tập hợp điểm
biên và nằm trên đường thẳng [3.1-1].

K1 , K 2 , K3
Bước 4 : Dựa vào điểm K1 và K3 ,ta sẽ dựng đường thẳng K1 K 3 đi qua hai điểm K1 và K 2 , sau đó ta sẽ
dựng 2 đường thẳng K1O1 , K3O3 vuông góc với đường thẳng K1 K 3 và lần lượt đi qua K1 , K3 . Cách dựng
Hình 5. Cácđiểm trung tâm và điểm

những đường thẳng này như sau:

K1K3  mx  b
K1O1  m1 x  b1
K3O3  m3 x  b3
Trong đó,

m

K3 y  K1 y
1
1
và b  K3 y  m K3 x , m1 
và b1  K1 y  m1 K1 x , m3 

m
m

K3 x  K1 x

b3  K3 y  m3 K3 x ,

O1  x, y 

là điểm thuộc đường thẳng K1O1 và có tọa độ x nhỏ nhất,

O3  x, y 

là điểm

thuộc đường thẳng K3O3 và có tọa độ x nhỏ nhất.
ISBN: 978-604-82-1375-6

6


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM

Hình 6. Các đường thẳng K1O1 và K3O3 , K1O3
Sau đó ta sẽ tiến hành lọc bỏ các điểm ngoài vùng quan tâm (ROI) bằng cách sử dụng các bất đẳng thức
sau:

 G  x, y  * L  x, y  , mx  b  K1K3  0
G  x, y  * L  x, y   
, mx  b  K1K3  0
0

 G  x, y  * L  x, y  , m1 x  b1  K1O1  0

G  x, y  * L  x , y   
, m1 x  b1  K1O1  0
0
 G  x, y  * L  x, y  , m3 x  b3  K3O3  0
G  x, y  * L  x, y   
, m3 x  b3  K3O3  0
0

Hình 7. Ảnh sau khi lọc bỏ các thành phần không quan tâm
Bước 5 : Xoay
xoay

G  x, y  * L  x, y  với góc  được tính bởi góc lệch giữa hai điểm K2 và O1 , sau khi

G  x, y  * L  x, y 

với góc

 thì vùng quan tâm (ROI) O được trích xuất với chiều cao là 140 pixel và

chiều rộng là 310 pixel.

ISBN: 978-604-82-1375-6

7


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM

(a)


(b)

Hình 8. (a) Ảnh sau khi được xoay, (b) Định vị vùng quam tâm và trích xuất vùng quan tâm (ROI)
RÚT TRÍCH ĐẶC TRƯNG VÀ ĐỐI SÁNH ĐẶC TRƯNG
Rút trích đặc trưng
Đặc trưng dòng chính và vết nhăn có thể nhận xét từ hình ảnh chụp palmprint của chúng ta. Một số lý
thuyết ví dụ như lọc ngăn xếp (stack filter) có thể thu được đặc trưng dòng chính. Tuy nhiên, những đặc trưng
dòng chính không đạt được tỷ lệ nhận diện cao bởi vì sự tương đồng giữa những lòng bàn tay khác nhau. Hình 9
cho thấy 6 hình ảnh palmprint có đặc trưng dòng chính tương đối giống nhau. Bên cạnh đó, đặc trưng vết nhăn
có khả năng chứng thực palmprint cao nhưng việc rút trích đặc trưng từ chúng khó thực hiện. Với những lý do
trên việc ứng dụng phân tích kết cấu (texture) để chứng thực palmprint là điều cần thiết.

Hình 9. Đặc trưng dòng chính khác nhau
Trong thực nghiệm, hàm Gabor [5] với thiết lập những thông số đặc biệt (  ,  ,  ) thì sẽ được biến đổi
thành bộ lọc Gabor rời rạc. Các thông số này sẽ được chọn từ bảng 4.1 thiết lập sau :
Bảng 1. Thông số của 5 bộ lọc
Số thứ tự

Kích thước bộ lọc







1

35x35


0

0.01145

44.9432

2

35x35

45

0.01145

44.9432

3

35x35

90

0.01145

44.9432

4

35x35


120

0.01145

44.9432

5

35x35

135

0.01145

44.9432

ISBN: 978-604-82-1375-6

8


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
Bộ lọc Gabor được thiết lập bởi những thông số đặc biệt ở bảng 1 sẽ nhân chập với ảnh vùng quan tâm
(ROI) 310x140 pixel. Hình ảnh thu được sau khi thực hiện lọc Gabor sẽ được mã hóa theo cách sau :

Hình 10. Vùng quan tâm (ROI) được trích xuất từ long bàn tay

Hình 11. Hình ảnh Pr sau khi được mã hóa với các thông số thiết lập bộ lọc Gabor là


G  x, y, 0, 0.01145, 44.9432

Đối sánh vector đặc trưng
Quá trình đối sánh các đặc trưng sử dụng lý thuyết khoảng cách Hamming để tính toán điểm đối sánh. Gọi
𝑀 và 𝑉 là hai ma trận đặc trưng có khoảng cách w x h và khoảng cách Hamming H giữa hai ma trận này được
quy định như sau:
h

w

H  ((M r  i, j   Vr  i, j )  (M i  i, j   Vi i, j ) )
i 1 j 1

Trong đó, M r và Vr là phần thực, M i và Vi là phần ảo ,
tính dựa theo công thức Do 



là phép toán xor. Điểm đối sánh được

H
, Do có giá trị thuộc khoảng [0, 1], giá trị Do càng gần 0 thì kết quả
2  w*h 

đối sánh càng hoàn hảo.
CÀI ĐẶT THUẬT TOÁN
Quá trình cài đặt trải qua hai giai đoạn : tạo cơ sở dữ liệu và cài đặt thuật toán trên điện thoại di
động.Nhóm tác giả tạo cơ sở dữ liệu phục vụ cho việc kiểm tra thuật toán bao gồm 52 hình ảnh lòng bàn tay, có
ISBN: 978-604-82-1375-6


9


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
kích thước là 1520 x 2688 được lấy từ 13 người và độ tuổi được lựa chọn là từ 21 tuổi đến 24 tuổi. Qua các quá
trình tiền xử lý ta thu được hình ảnh vùng quan tâm (ROI) có kích thước là 310 x 140.

Hình 12. Ảnh lòng bàn tay được lưu trong cơ sở dữ liệu vơi mã số là 3
Điều kiện lấy mẫu tuân theo một số điều kiện sau : lòng bàn tay được đặt dưới ánh sáng đèn của phòng thí
nghiệm, cho phép nhiễu của sự rung lắc tay, đèn flash của điện thoại được chiếu trực tiếp vào lòng bàn tay,
người được lấy mẫu không đeo các trang sức ở các ngón tay và lòng bàn tay. Mỗi tập mẫu của mỗi người sẽ
được cấp một mã số để phục vụ cho việc thực hiện đối sánh về sau và mẫu được yêu cầu chứng thực sẽ chỉ đối
sánh với các mẫu có cùng mã số.
Thuật toán được cài đặt trên nền tảng hệ điều hành Android 4.2.2 nhưng vẫn tương thích ngược với các
phiên bản Android 4.0 trở lên [6,7]. Thuật toán được kiểm tra trên điện thoại di động HTC JOne có cấu hình như
sau : máy chụp hình có độ phân giải 4 Mega Pixel, với kích thước hình ảnh tối đa là 2688 x 1520, chế độ tự động
lấy nét, ổn định quang học, đèn flash Led,vi xử lý Quad-Core 1.7 GHz Krait 300, chip đồ họa Adreno 320, hệ
điều hành Android 4.4.2, bộ nhớ Ram 2 GB. Bên cạnh đó thuật toán còn được cài đặt trên máy tính với cấu hình
như sau : Dell Inspiron N5110 Intel Core i5-2410M 2.3GHz ( 4CPUs ), RAM 8 GB, BUS 1333 MHz, NVDIA
GeForce GT525M 1024 MB, hệ điều hành Window 7 64 bit.

(a)

(b)

Hình 13. (a) Giao diện phần mềm Palmprint Authentication chạy trên điện thoại Android HTC JOne, (b) Ảnh
đầu vào được nhị phân hóa
ISBN: 978-604-82-1375-6

10



Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM

(a)

(b)

Hình 14. (a) Vùng quan tâm được trích xuất, (b) Ảnh mã hóa sau khi được lọc qua lọc Gabor
KẾT QUẢ THỰC NGHIỆM
Hiệu suất chứng thực của chương trình sẽ thay đổi theo thế ngưỡng 𝑇𝑎𝑟 . 𝑇𝑎𝑟 sẽ điều khiển FAR và FRR, 2
thông số này sẽ tỉ lệ nghich với nhau, dựa vào hình ảnh biểu đồ bên dưới ta sẽ phân tích được sự phân bố điểm
đốisánh của tập mẫu trong cơ sở dữ liệu.

Hình 15. Phân bố điểm đối sánh của các tập mẫu với các thông số của hàm lọc Gabor ( 0, 0.01145,
44.9432 )
ISBN: 978-604-82-1375-6

11


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
Dựa vào số liệu thực nghiệm trên phần mềm Matlab, nhóm tác giả rút ra được bảng số liệu sau :
Bảng 2. Kết quả thực nghiệm của việc chọn thế ngưỡng Tar
Thông số lọc Gabor  ,

,

0, 0.01145, 44.9432


45, 0.01145, 44.9432

90, 0.01145, 44.9432

120, 0.01145, 44.9432

135, 0.01145, 44.9432

Thế ngưỡng Tar

FAR (%)

FRR (%)

0.07

0.00

3.14

0.08

0.07

2.51

0.09

0.44


2.37

0.10

0.73

1.33

0.11

2.15

0.96

0.12

4.36

0.74

0.07

0.14

2.81

0.08

1.33


1.99

0.09

3.47

1.26

0.10

3.73

0.81

0.11

4.07

0.44

0.12

4.31

0.29

0.07

0.00


3.55

0.08

0.00

2.81

0.09

0.00

2.44

0.10

0.22

1.99

0.11

0.89

1.40

0.12

3.32


1.10

0.07

0.00

2.66

0.08

0.00

1.99

0.09

0.07

1.77

0.10

0.73

1.18

0.11

3.03


1.06

0.12

4.88

0.66

0.07

0.00

2.99

0.08

0.15

1.77

0.09

0.22

1.48

0.10

0.96


1.35

0.11

1.92

0.66

0.12

5.25

0.44

Do các quá trình xử lý khác tùy thuộc vào hệ điều hành và phần cứng mà thiết bị sẽ có cách xử lý khác
nhau, vì vậy ở bài báo cáo này nhóm tác giả chỉ thực hiện đo thời gian xử lý ở quá trình rút trích đặc trưng , điều
kiện kiểm tra tuân theo tiêu chuẩn sau :máy tính chạy trên phần mềm Matlab R2013a và không mở các ứng dụng
khác, máy tính không thực hiện kỹ thuật đa luồng và không sử dụng GPU để tăng tốc độ xử lý, điện thoại chạy
trên hệ điều hành Android 4.4.2 và không mở các ứng dụng và dịch vụ chạy ngầm khác, điện thoại sử dụng kỹ
thuật đa luồng để lấy được thời gian xử lý tốt nhất.

ISBN: 978-604-82-1375-6

12


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
Sau khi tiến hành đo thời gian xử lý quá trình rút trích đặc trưng dựa theo tiêu chuẩn trên thì nhóm tác giả
có được bảng số liệu sau :
Bảng 3. Kết quả đo thời gian xử lý quá trình rút trích đặc trưng

Thông số lọc Gabor (  ,
,)

Thời
gian xử
lý (s)

0, 0.01145,
44.9432

45, 0.01145,
44.9432

90, 0.01145,
44.9432

120, 0.01145,
44.9432

135, 0.01145,
44.9432

Điện thoại

1.939

2.068

1.989


1.905

1.86

Máy tính

0.624

0.4992

0.546

0.6396

0.7332

Dựa vào bảng 3 ta có thể thấy rằng thời gian xử lý của điện thoại lâu hơn khoảng 3.5 lần so với thời gian
xử lý trên máy tính. Nhưng với thời gian xử lý chỉ từ 1.86 giây đến 2.068 giây thì việc ứng dụng thuật toán xử lý
rút trích đặc trưng trên điện thoại di động là khả quan.
KẾT LUẬN
Trong bài báo này, nhóm tác giả đã giới thiệu về tổng quan về thuật toán nhận dạng đặc trưng sinh trắc học
lòng bàn tay trên nền tảng di động. Nhóm tác giả đã thực hiện thành công thuật toán này chạy trên máy tính và
điện thoại di động .Từ những thông số kết quả thu được ở trên, cho thấy rằng thuật toán mất rất ít thời gian để
thực hiện nhưng trên máy tính lại tốn ít thời gian hơn trên điện thoại di động, điều này làm cho khả năng đáp ứng
tức thời của 2 phần mềm có sự chênh lệch nhau. Nhưng với sự phát triển không ngừng của lĩnh vực thiết kế vi
mạch thì điều này trong tương lai sẽ được khắc phục.
Bên cạnh những công việc nhóm tác giả đã thực hiện thành công thì vẫn còn tồn tại những việc mà nhóm
tác giả cần phải thực hiện trong tương lai . Đầu tiên là tăng tốc độ xử lý của thuật toán trên điện thoại di động và
máy tính. Thứ hai là các hình ảnh lòng bàn tay sẽ được chụp và cho phép xử lý ở cả hai lòng bàn tay. Thứ ba là
các hình ảnh lòng bàn tay được chụp sẽ không cần ánh sáng đèn flash chiếu thẳng vào. Thứ tư là nhóm tác giả sẽ

sử dụng ngôn ngữ lập trình Java để xây dựng một thư viện mã nguồn mở, nhằm mục đích thực hiện việc kế thừa
và cải thiện thuật toán này tốt hơn. Thứ năm là mở rộng đối tượng lấy mẫu lòng bàn tay để tăng số lượng tập
mẫu và tìm ngưỡng 𝑇𝑎𝑟 tốt hơn.

BUILDING FEATURE DETECTION ALGORITHM BIOMETRIC PALMPRINT
IN MOBILE PLATFORM
Nguyen Duy Thien, Tran Hoang Đat, Bui Trong Tu
University of Sciences, VNU-HCM
ABSTRACT
Personal authentication play an important role in our society. To overcome the disadvantages of
conventional authentication methods, biometric authentication has been developed to use the
characteristics of human nature. In this paper, we develop a software application of palmprint
authentication in mobile platform. Authentication have four steps consisting of data acquisition,
preprocessing, feature extraction and matching. A 2-D Gabor filter is used to obtain the texture
information then two palmprint images are matched by Hamming distance. The authentication has
been tested on 14 persons with 4 palmprint images per one person. In addiotion, the software
application provides a good performance with FAR of 0% and FRR of 2.66% with the threshold value
of 0.7.
Keywords: FRR, FAR, ROI
TÀI LIỆU THAM KHẢO
[1]. D.Zhang, Palmprint Authentication,Springer Science & Business Media, 2004.
[2]. D.Zhang, W.K.Kong, J.You, M. Wong,”Online palmprint identification”, IEEE Transactions on pattern
andalysis and machine intelligence25 (9) (2003) 1041 – 1050.
[3]. W.K.Kong, D.Zhang, ”Palmprint Texture Analysis based on Low Resolution Images fod Personal
Authentication”, Proceedings of 16th International Conference on Pattern Recognition3 (2002) 807–
810.
ISBN: 978-604-82-1375-6

13



Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
[4]. Z.Khan, A.Mian, Y.Hu, “Contour Code : Robust and Efficent multispectral palmprint encoding for
human recognition ”, IEEE international Conference (2011).
[5]. W.K.Kong, D.Zhang, W.Li, “Palmprint feature extraction using 2D Gabor filters”, Pattern Recognition
36 (2003) 2339 – 2347.
[6]. G.Allen, M.Murphy, Beginning Android 4, Apress, 2011
[7]. S.Komatineni, D.MacLean, Pro Android 4, Apress, 2012

ISBN: 978-604-82-1375-6

14


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
VIII-O-2

AN EFFICIENT HARDWARE ARCHITECTURE FOR HMM-BASED TTS SYSTEM
Su Hong Kiet1, Huynh Huu Thuan1, Bui Trong Tu1
1

University of Natural Sciences, VNU-HCM

ABSTRACT
This work proposes a hardware architecture for HMM-based text-to-speech synthesis system
(HTS). In high speed platforms, HTS with software core-engine can satisfy the requirement of realtime processing. However, in low speed platforms, software core-engine consumes long time-cost to
complete the synthesis process. A co-processor was designed and integrated into HTS to accelerate
the performance of system.
Keywords: text-to-speech synthesis, HMM, HTS, SoPC, FPGA.
INTRODUCTION

A HTS consists two parts of training part and synthesis part as show in Figure 1. In training part, a contextdependent HMM database is trained from speech database. Trained context-dependent HMM database consists
of models for spectrum, pitch and state duration; and decision trees for spectrum, pitch and state duration. Then,
the trained context-dependent HMM database is used by synthesis part to generate speech waveform from given
text.

Figure 1. Scheme of HTS
In synthesis part, given text is analyzed and converted into label sequence. According to label sequence,
HMM sentence is constructed by concatenating HMMs taken form trained HMM database. And then, excitation
and spectral parameters are extracted from HMM sentence. Excitation and spectral parameters are fed to
synthesis filter to synthesize speech waveform. Depending on the fact that spectral parameter is presented as
mel-cesptral coefficients or mel-generalized cepstral coefficients, synthesis filter is constructed as MLSA filter
or MGLSA filter, respectively.
In recent research, HTS is applied to many languages such as Japanese [1], English [1], Korean [13],
Arabic [14] and so on. Moreover, thank to the small-size of core-engine, HTS can be implemented on various
devices such as personal computer, server and so on. On high speed platforms such as PC, HTS with software
core-engine can satisfy requirement of real-time processing. In contrast, on low speed platforms, software coreengine consumes long time-cost to convert text to speech, i.e., the system do not meet real-time processing. In
ISBN: 978-604-82-1375-6

15


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
order to implement an efficient HTS on low speed platforms, speeding up the performance of core-engine is on
demand. This work uses a co-processor to accelerate the performance of HTS built on FPGA-based platform.
The rest of this paper is organized as follow: Section 2 presents the co-processor for HTS. Section 3
proposes a hardware architecture for HTS built on FPGA-based platform. Section 4 presents experiment for
evaluating the performance of proposed system.
CO-PROCESSOR FOR HTS
HTS Working Group have been developing a software core-engine for HTS (HTS-engine) [10]. HTSengine provides functions to generate speech waveform from label sequence by using a trained contextdependent HMM database. The process of generating speech waveform from label sequence can be split into
three steps as follow:

•Step 1: parsing label sequence and creating the HMM sentence.
•Step 2: generating speech parameters from HMM sentence.
•Step 3: generating speech waveform (synthesized speech) from speech parameters.
The evaluation of performance of HTS-engine on various platforms shows that time-cost for Step-1 is
small, Step-2 and Step-3 consume about 10% and 90% of total time-cost, respectively [15]. The performance of
HTS-engine on FPGA-based platform is shown in Table 1.
Table 1. Performance of HTS-engine on FPGA-based platform
FPGA device

System
configuration

Synthesized
speech
Time-cost (s)

R IV 4CE115
Altera Cyclone○
FPGA chip
Nios-II with
CPU
-Floating point hardware
-Instruction cache: 4KB
-Data cache: 2KB
Frequency
125 MHz
Instruction storage
SRDAM
SDRAM
Data storage

Flash memory for storing
trained HMM database
144,240 samples which correspond to 3.005s of
speech. (Note: sampling rate is set as 48 KHz)
Step 1
0.25
Step 2
2.77
Step 3
34.27

Table 1 shows that time-cost in FPGA-based platform is much larger than the length of synthesized speech
(above ten times). In order to accelerate the system performance, a co-processor is designed to take place HTSengine to carry out Step-2 and Step-3. Step-1 is still carried out by HTS-engine to maintain the flexibility of
system. Architecture of the co-processor is shown in Figure 2.

Figure 2. Architecture of co-processor
Speech parameter generator (SPG) carries out the processing of generating speech parameters from
means and variances of states in the constructed HMM sentence. The detailed architecture of SPG is shown in
ISBN: 978-604-82-1375-6

16


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
Figure 3-a. SPG consists of an arbiter and five sub-modules. The arbiter communicates with main CPU via
Avalon bus and controls the operation of sub-modules via an internal bus. Each sub-module carries out its own
specified task and activated by the arbiter. After a sub-module completes its task, it informs the arbiter. And
then, the arbiter deactivates the sub-module.

(a)


(b)

Figure 3. Architecture of SPG (a) and SSG (b)
Synthesized speech generator (SSG) carries out the processing of generating synthesized speech from
speech parameters. Similar to SPG, SSG consists of an arbiter and several sub-modules. The arbiter
communicates with main CPU via Avalon bus and controls the operation of sub-modules via an internal bus.
Each sub-module carries out its own specified task and activated by the arbiter. After a sub-module completes its
task, it informs the arbiter. And then, the arbiter deactivates the sub-module. Detailed architecture of SSG is
shown in Figure 3-b.
Floating point unit (FPU) is integrated into the co-processor to support SPG and SSG to carry out
operations in floating point numbers. FPU supports operations of addition, subtraction, multiplication, division,
modulo, comparison, exponential, natural logarithm and cosine. FPU is shared for the arbiters and sub-modules
of SPG and SSG. In order to avoid the conflict, at any time, at most one arbiter or one sub-module can use FPU,
i.e., other arbiters and sub-modules must release the FPU interface bus.
Internal memory stores data which are used or created by SPG or SSG. Similar to FPU, the internal
memory is a shared resource. At any time, at most one arbiter or one sub-module can access the internal
memory, i.e., other arbiters and sub-modules must release the internal memory interface bus.
HARDWARE ARCHITECTURE FOR HTS
Figure 4 shows the hardware architecture for HTS built on FPGA-based platform, in which a co-processor
is integrated into the system to accelerate system peformance. Nios-II CPU is the main CPU of the system.
SDRAM is instruction storage and data storage of the system. PLLs are used for setting the frequency of clocks
in the system. UART port is used for debug mode. This architecture consists of synthesis part of HTS only, i.e.,
it do not consists of training part. So the proposed system need a trained context-dependent HMM database.
Since the HMM database is saved in files, a flash memory is used to store the HMM database so that we can use
read only zip file system (which is supported by Altera) to load data from the HMM database.

ISBN: 978-604-82-1375-6

17



Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM

Figure 4. Hardware architecture for HTS
EXPERIMENT
Building the proposed system shown in Figure 4 on Stratix IV FPGA development board, in which input
text device is a touch-screen, audio output device is a DAC card connecting to a speaker. Performance of system
is shown in Table 2.
Table 2. Performance of HTS on FPGA-based platform with a co-processor
Input text

Synthesized speech
(Sampling rate = 38 KHz)
Number of
samples

Time-cost
(s)

Length (s)

bộ giáo dục và đào tạo

95040

2.501

2.462


đại học khoa học tự nhiên

95040

2.501

2.428

đại học tự nhiên

74880

1.970

1.882

thuê bao vừa được gọi
không liên lạc được

116640

3.069

3.040

thành phố hồ chí minh
ngày mùng hai tháng chín

128460


3.381

3.375

Table 2 shows that performance time-cost is smaller than the length of synthesized speech, i.e., the
requirement of real-time processing is met. Comparing to the system which do not have co-processor, the
performance time-cost is reduced significantly. When co-processor is not used, the performance time-cost is
above ten times larger than the length of synthesized speech. But after integrating co-processor into the system
and setting system configuration appropriately, performance time-cost can decrease to a value smaller than the
length of synthesized speech.
Moreover, synthesized speech is intelligible and has the same quality to the speech synthesized by HTS
built on PC-platform. Denoting waveforms which generated from the same input text by the proposed HTS and
HTS built on PC-platform by 𝑋1 and 𝑋2 , respectively.

𝑋1 = [𝑥11 , 𝑥12 , … , 𝑥1𝑁 ]
𝑋2 = [𝑥21 , 𝑥22 , … , 𝑥2𝑁 ]
ISBN: 978-604-82-1375-6

18


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
where 𝑥1𝑖 and 𝑥2𝑖 with 𝑖 = 1, 2, … , 𝑁 are samples of 𝑋1 and 𝑋2 , respectively.
Mean square error (MSE) between two vectors 𝑋1 and 𝑋2 is calculated as following equation
𝑁

𝑀𝑆𝐸 =

1
∑(𝑥1𝑖 − 𝑥2𝑖 )2

𝑁

(1)

𝑖=1

(a)

(b)

Figure 5. Waveform generated from the input text ” bộ giáo dục và đào tạo”
by proposed HTS (a) and HTS built on PC-platform (b)
Applying Eq.-1 to waveforms which are generated from different input text, we obtain the result in Table 3.
Table 3. Mean square error between waveforms generated by proposed HTS and HTS built on PC-platform
Input text

MSE

bộ giáo dục và đào tạo

0.034

đại học khoa học tự nhiên

0.020

đại học tự nhiên

0.022


thuê bao vừa được gọi
không liên lạc được

0.045

thành phố hồ chí minh
ngày mùng hai tháng chín

0.038

Table 3 shows that the MSEs between two systems are smaller than 4,5%, i.e., waveforms generated from
two systems are alike.
CONCLUSIONS
An efficient hardware architecture for HTS built on FPGA-based platform was proposed by this work. In
the proposed architecture, a co-processor is used to accelerate the performance of the system. Experiment results
show that using co-processor decrease performance time-cost significantly. It leads the system meets the
requirement of real-time processing. Moreover, speech synthesized by the proposed system is intelligible and
has a waveform alike to one which is generated by HTS built on PC-platform.
REFERENCES
[1]. Tokuda K., Zen H., & Black A. W. (2002, September). An HMM-based speech synthesis system applied
to English. In Speech Synthesis, 2002. Proceedings of 2002 IEEE Workshop on (pp. 227-230). IEEE.
[2]. Tokuda K., Masuko T., Miyazaki N., & Kobayashi T. (2002). Multi-space probability distribution HMM.
IEICE TRANSACTIONS on Information and Systems, 85(3), 455-464.
[3]. Tokuda K., Masuko T., Miyazaki N., & Kobayashi T. (1999, March). Hidden Markov models based on
multi-space probability distribution for pitch pattern modeling. In Acoustics, Speech, and Signal
Processing, 1999. Proceedings., 1999 IEEE International Conference on (Vol. 1, pp. 229-232). IEEE.
[4]. Yoshimura, T., Tokuda, K., Masuko, T., Kobayashi, T., & Kitamura, T. (1998, December). Duration
modeling for HMM-based speech synthesis. In ICSLP (Vol. 98, pp. 29-31).
[5]. Yoshimura T., Tokuda K., Masuko T., Kobayashi T., & Kitamura T. (1999). Simultaneous Modeling of
Spectrum, Pitch and Duration in HMM-Based Speech Synthesis. In Sixth European Conference on

Speech Communication and Technology.

ISBN: 978-604-82-1375-6

19


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
[6]. Tokuda K., Yoshimura T., Masuko T., Kobayashi T., & Kitamura T. (2000, June). Speech parameter
generation algorithms for HMM-based speech synthesi s. In Acoustics, Speech, and Signal Processing,
2000. ICASSP’00. Proceedings. 2000 IEEE International Conference on (Vol. 3, pp. 1315-1318). IEEE.
[7]. Fukada T., Tokuda K., Kobayashi T., & Imai S. (1992, March). An adaptive algorithm for mel-cepstral
analysis of speech. In Acoustics, Speech, and Signal Processing, 1992. ICASSP-92., 1992 IEEE
International Conference on (Vol. 1, pp. 137-140). IEEE.
[8]. Tokuda K., Kobayashi, T. Masuko, T., & Imai S. (1994, September). Mel-generalized cepstral analysis-a
unified approach to speech spectral estimation. In ICSLP.
[9]. SPTK Working Group. (2013, December). Reference Manual for Speech Signal Processing Toolkit Ver
3.7. />[10]. HTS Working Group. HMM-based Speech Synthesis Engine (hts_engine API) Ver. 1.06.
/>[11]. Pham N. M., Dau D. N., & Vu Q. H. (2013). Distributed Web Service Architecture Towards Robotic
Speech Communication: A Vietnamese Case Study. Int J Adv Robotic Sy, 10(130).
[12]. Taylor P. (2009). Text-to-speech synthesis. Cambridge University Press.
[13]. Kim S. J., Kim J. J., & Hahn M. (2006). HMM-based Korean speech synthesis system for hand-held
devices. Consumer Electronics, IEEE Transactions on, 52(4), 1384-1390.
[14]. Khalil K. M., & Adnan C. (2013, March). Arabic HMM-based speech synthesis. In Electrical Engineering
and Software Applications (ICEESA), 2013 International Conference on (pp. 1-5). IEEE.
[15]. Nguyen H. B., Cao T. B. T., Bui T. T.,& Huynh H. T (2013, November). A Performance Evaluation of
HMM Based Text- to- Speech System on Various Platforms. Proceedings of ICDV-2013, pp. 265-267.

ISBN: 978-604-82-1375-6


20


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
VIII-O-3

DESIGNING A HIGH PERFORMANCE CRYPTOSYSTEM
FOR VIDEO STREAMING APPLICATION
Nguyen Van Toan1, Do Quoc Minh Dang1, Nguyen Duc Phuc1, Nguyen Dinh Thuc2, Huynh Huu Thuan1
1

Faculty of Electronics and Telecommunications, HCMC University of Science
2
Faculty of Information Technology, HCMC University of Science

ABSTRACT
This paper presents the hardware design of a high performance cryptosystem for video
streaming application. Our proposed system is the combination of two cryptographic algorithms,
symmetric key algorithm and asymmetric key algorithm (also called public key algorithm) to take their
benefits. The symmetric key algorithm (ZUC) is used to encrypt/decrypt video, and the public key
algorithm (RSA) performs the encryption/ decryption for the secret key. This architecture has high
performance, including high security and high processing bit rate. High security is archieved due to the
ease of key distribution of the asymmetric key cryptosystem and the secret key can be easily changed.
High processing bit rate of video encryption/decryption is the result of the high speed of
encryption/decryption of the symmetric key algorithm. The H.264 video decoder is also integrated into
this system to test the functionality of the proposed cryptosystem. This system is implemented in
Verilog-HDL, simulated by using ModelSim simulator and evaluated by using Altera Stratix IV-based
Development Kit. The speed of video decryption achieves up to 4.0 Gbps at the operating frequency
of 125 MHz, which satisfies applications with high bandwidth requirement such as video streaming.
Keywords: cryptosystem, encryption, decryption, RSA, ZUC, FPGA.

INTRODUCTION
Nowadays information security is a subject with a high interest. The development of computer networks,
particularly Internet, results more and more applications and services are carried out electronically, for example,
PayTV, video streaming, internet-banking, and so on. Since the information of these applications and services
are possible transmitted in insecure channels, the demand of information security becomes essential. The
increase of the demand of information security makes cryptography to become important.
Symmetric key cryptography uses the same key for both encryption and decryption. The advantage of
symmetric key algorithms is that their execution is fast [1]. However, the critical issue of the symmetric key
cryptosystem is the secret key distribution. On the other hand, the public key algorithm uses a pair of keys(public
key and private key) to perform data encryption and decryption. The advantage of the public key cryptosystem is
that providing public keys is easier than distributing secret keys securely [2]. However, the execution of public
key algorithms is much slower than the execution of symmetric key algorithms.A hybrid cryptographic system in
[2] was implemented by combining Advanced Encryption Standard (AES), Data Encryption Standard (DES) and
public key algorithm (RSA), which has benefits in key distribution and high security [2]. Data block is encrypted
by using AES or DES while their secret keys are encrypted by using RSA algorithm. The encrypted secret key is
then concatenated with the encrypted data to form the packets and sent to the destination. This implementation
does not need key exchange separately [2]. However, every data block contains the encrypted key and each data
block is encrypted by using different session key, which does not save the transmission bandwidth. And the
system must decrypt the secret key completely before data decryption, which is not appropriate with video
streaming application. The system was proposed in [3] included 1024-bit RSA algorithm, 163-bit Elliptic Curve
Cryptography (ECC), 128-bit AES. In this system, AES was used to encrypt the transferred document to produce
cipher-text, and RSA (or ECC) provided encryption/decryption for the secret key. This system also achieves high
security. However, it does not allow us to change the secret key during data transfer. Both works [2], [3], AES
cryptosystem (block cipher) was used to encrypt data. The drawback of block cipher are: (1) data block needs to
be padded if its size is less than block size, (2) be sufferred error propagation, (3) the speed of
encryption/decryption is less than that of stream cipher.
Our proposed cryptosystem combines the ZUC stream cipher [4] and the public key cipher RSA with
1024-bit key length. RSA is widely used public key algorithm [1]. The ZUC cipher is the new stream cipher that
will be commonly used in many countries [5]. It is simple, faster than block cipher [1]. The video content is
encrypted/decrypted by using ZUC algorithm. And the secret key is encrypted/decrypted by using RSA

algorithm. The encrypted symmetric key is then concatenated with the encrypted video to form the transmitted
packets. In addition, our system allows us to change the secret key. In case of no key changing, the encrypted
key is not present in the transmitted packets, which saves the transmission bandwidth. Additionally, we build the
system that enables to decrypt a new secret key and video in parallel. That means while RSA core is decypting
ISBN: 978-604-82-1375-6

21


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
new secret key, ZUC core still uses the current secret key for data decryption. This feature was not implemented
in the existing systems [2-3]. It is also difficult to implement this feature by software. Our proposed system
achieves high security and speed which is very suitable for real time applications. In paper, we focus on the
implementation of hardware architecture of cryptosystem for video streaming application.
SYSTEM ARCHITECTURE
The overall block diagram of the proposed embedded system
ENCRYPTED
VIDEO

ETHERNET

DISPLAY DEVICE

DDR3 (A)

NIOS II

DDR3 (B)

DISPLAY

CONTROLLER

AVALON SWITCH FABRIC

DMA

FIFO

CRYPTOSYSTEM
(RSA, ZUC)

FIFO

H.264
DECODER

Figure 1. The overall block diagram of the proposed embedded system
The block diagram of the proposed embedded system is shown in Figure 1. The encrypted data (the
encrypted secret key and the encrypted video stored in Server) and streamed to the evaluation board via Ethernet
interface and stored into DDR3 (A). DMA module reads the encrypted data from DDR3 (A) and pushes them
into FIFO. The cryptosystem reads the encrypted data from FIFO to decrypt video content. Firstly, the RSA
coprocessor decrypts the secret key. Then the ZUC coprocessor uses that secret key to generates a keystream to
decrypt the video content (video in compressed H.264 format). And the video content is pushed into another
FIFO. When the video content is available in FIFO, the H.264 video decoder decodes the video content and
writes it to DDR3 (B). Finally, the display controller reads video from DDR3 (B) andsends it to the display
device.H.264 decoder module has features: capable to decode H.264/AVC baseline profile video of VGA
resolution (640x480) with 25 frames per second at the clock frequency of 25 MHz. Output frame format is in
4:2:0 YCbCr sampling format.
The block diagram of the proposed cryptosystem
Our proposed cryptosystem is the combination of ZUC algorithm and RSA algorithm. The RSA algorithm

is used to encrypt/decrypt the secret key (key of ZUC algorithm). ZUC algorithm provides the
encryption/decryption for video content. Figure. 2 illustrates our proposed cryptosystem.
DECRYPT CONTROLLER controls to read the encrypted secret key from FIFO to its registers. And then
RSA coprocessor performs to decrypt the secret key. When RSA coprocessor completes its decryption, it
indicates to ZUC coprocessor by asserting zuc_key_valid signal. The ZUC coprocessor then loads the secret key
into its LFSR and produces a keystream. Video content is recovered by XORing the encrypted video and
thegenerated keystream. The decrypted video will be stored in the FIFO. Whenever the secret key needs to be
changed (through the signaling in the header of the received packets), the RSA decrypts that new secret key
while ZUC still uses the current key to produce the keystream for decrypting video content. As soon as RSA
coprocessor completes itsoperation, and the signaling in the received packet indicates to apply the new secret
key, ZUC coprocessor then uses that new secret key to generate a keystream for the next decryption. Figure 3
shows the frame format of each transmitted packet. It is made of the encrypted video, encrypted secret key and
signaling. The signaling aims to: (1) when new encrypted secret key is coming, (2) when new secret key is
applied.

ISBN: 978-604-82-1375-6

22


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
data_fr_fifo
keystream

32

32
zuc_key_valid
zuc_key 32


ZUC

32

ctrl_sig_zuc

RSA
ctrl_sig_rsa

data_to_fifo

clk

clk
data_fr_fifo

fifo_almost_full
fifo_wr_req

DECRYPT
CONTROLLER

reset_n

clk

fifo_almost_empty
fifo_rd_req

enable


FIFO OUT

FIFO IN

Figure 2. The proposed cryptographic system

Encrypted video

Encrypted key

Signaling

Figure 3. Encrypted packet
The advantages of our system are as follows
High security is achieved because the secret key is encrypted by the RSA algorithm, and there is no key
establishment separately before data transferring.
We can change the secret key at anytime without key re-establishment as in traditional cryptosystem.
Our system saves the transmission bandwidth by elemenating the encrypted secret key in the packets sent
in case of no key changing.
Our proposed system enables to decrypt a new secret key and the encrypted video in parallel, which makes
the quality of service better, e.g., video decryption is performed continuously and smoothly.
Design of ZUC
ZUC is a word-oriented stream cipher [4]. It takes a 128-bit initial key and a 128-bit initial vector as input,
and outputs a keystream of 32-bit words.The architecture of ZUC stream cipher is proposed as Figure. 4. The top
layer is a linear feedback shift register (LFSR) that consists of 16 of 31-bit registers. The middle layer is bit
reorganization (BR) that extracts 128 bits of registers of LFSR to form 4 of 32-bit words. The first three words
are the inputs of nonlinear function F, and the last word is used in keystream generation. The bottom layer is the
nonlinear function F that takes three words X0, X1, X2 as inputs and outputs 32 bit word W. The outputted
keystream is shifted into a 32-bit register.

The LFSR has two operation modes: initialization mode and working mode. In initialization mode, the
LFSR receives 31 bits of W (bit 31 to 1) as its input. In the working mode, the LFSR does not receive any input,
and produces a 32-bit word per clock cycle. In hardware implementation, we use a multiplexer to select the input
for these modes.We found that the critical path in the ZUC architecture is the circuit used to update LFSR in the
initialization stage and the working stage. There is a chain of six modulo (231 – 1) additions to compute the value
of S16. Therefore, the timing optimization of this critical path improves the operating frequency of ZUC core.
The expression of S16 is given in equation (4).
v=215S15+217S13+221S10+220S4+(1+28)S0 mod (231-1) (3)
S16=[v+(W>>1)] mod (231-1) (4)
We propose to use carry save adders (CSA) to calculate the intermediate values and ripple carry adder to
calculate the final result. The hierarchical CSA tree is shown in the Figure. 5. In this architecture, one
multiplexer selects the mode of LFSR: initialization mode or working mode. To perform modulo (231 – 1)
ISBN: 978-604-82-1375-6

23


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM
addition,for each addition of CSA, carry is cyclic left-shifted by one bit. This implementation helps to improve
timing significantly because the delay of CSA is exactly equal to the delay of 1-bit full adder.
Addition modulo (231 – 1)

LFSR
<<15

<<17

<<21

<<20


S15 S14 S13 S12 S11 S10

S9

S8

S7

S6

S5

S4

<<8
S3

S2

S1

initialize
MUX

S0
>>1

BR


16 16

X0

16 16

X1

16 16

X2

16 16

32-bit
register

W
S15 S14
S0
....

key

128

keystream

Reg R2
W1


Key loading

128

Reg R1

0

X3

Bit-wise XOR operation

W2

F

Modulo 232 addition
U

V

L1

L2

240
IV

D


S(LUT)

S(LUT)

Figure 4. Architecture of ZUC
A

B

D

C

31-bit CSA
s1a
c1a

E

F

31-bit CSA
c1b
s1b

31-bit CSA
s2
c2


0

31-bit CSA
s3
c3

W[31:1]

MUX

mode

31-bit CSA
s4

c4
31

Adder mod (2 -1)
s16

Figure 5. Hierarchical Carry Save Adder tree
Design of RSA
The most popular public key algorithm is RSA invented by Rivest, Shamir, and Adleman [1]. For high
security reason, the key length of RSA algorithm is 1024 bits or greater [7]. The main operation of RSA
algorithm is the modular exponentiation. The modular exponentiation is performed by a series of the modular
multiplications. The Montgomery multiplication (MP) on large integer number is the efficient method to perform
the modular multiplication. There are two methods to compute the modular exponentiation: right-to-left (R-L)
method, left-to-right (L-R) method. The R-L method is faster than L-R method because the multiplication and
squaring can be performed in parallel. However, price paid for hardware resource is higher. In this paper, we

compute the modular exponentiation by using L-R method and the Montgomery multiplication.
Algorithm 1 implements the Montgomery multiplication. The addition of long operands in loop is
performed by 3-to-2 carry save adder (CSA). To get the final result, we need to add carry output and sum output
of CSA. In this paper, we use 32-bit RCA and a shift register to implement this final addition because of its
simplicity and area saving. It takes (k+3+k/32) clock cycles to complete the Montgomery multiplication, where k
is the size of the operands; k/32 is the number of clock cycle to complete the final addition. Figure. 6 shows the
CSA-based Montgomery multiplier.
ISBN: 978-604-82-1375-6

24


Báo cáo toàn văn Kỷ yếu hội nghị khoa học lần IX Trường Đại học Khoa học Tự nhiên, ĐHQG-HCM

Algorithm 1 – Montgomery multiplication by using
CSA
//Inputs: x, y, n
ps = 0, pc = 0, ss = 0, sc = 0;
for (i = 0; i <= k+1; i= i + 1){
(sc, ss) = (ps + pc + x(i) * y);
(pc, ps) = (ss + sc + ss(0)*n)/2;
}
return (ps + pc)
//Output: p = xyr-1 mod n with r = 2(k+2)

Algorithm 2 – Modular exponentiation, L-R method
a = C.r mod n;
b = 1.r mod n;
for (x = b, i = k – 1; i >= 0; i = i + 1) {
x = MP (x, x);

if (di == 1)x = MP (x, a);
}
x = MP (x, 1);
return x;
//Output: x = Cd

y
x(i)
register

n

CSA

carry

ss

CSA

x

x

0

1

00 01 10 11


a 1

x

ss(0)
sc

b

shift

load

sel_2
x

sum

Montgomery
multiplier

start

y

done
load

register
Initial = b


RCA

sel_2

Control

z

Control
Unit

two registers

sel_1

shift

di

Register (d)

x

Figure 6. Montgomery multiplier

Figure 7. Modular exponentiation using MP

Algorithm 2 implements the modular exponentiation by using the Montgomery multiplier. In this
algorithm, C is the operand that has the length of 1024 bits; di is the exponent with the length of 1024 bits.The

block diagram of the modular exponentiation is shown in Figure 7. This architecture uses only one Montgomery
multiplier. Two multiplexers are used to select inputs for the Montgomery multiplier. Based on the input value
di, the control block determines the values of sel_1 and sel_2.
RESULTS AND DICUSSION
Experimental results of ZUC and RSA
The ZUC implementation is passed all test sets that was provided by ZUC Implementor’s Test Data [7].
All the stages of the ZUC core have been implemented in hardware. To make the fair comparison, the
implementation is synthesized with Quartus II (Altera) and ISE (Xilinx) as well.In [5], they implemented a
pipeline architecture that achieves the maximum operating frequency of 222 MHz. However, it costs higher
hardware resources, higher latency (4 extra clock cycles), and initialization stage was implemented in software to
reduce hardware resources. In [6], their proposal used ripple carry adders in series, which limits the operating
frequency of the circuit. Our proposal uses hierarchical CSA tree, and RCAs, which achieves throughput up to
4.45 Gbps in Virtex 5, and 4.0 Gbps in FPGA Stratix IV EP4SGX230KF40C2.
Table 1. ZUC results and comparison
Architecture

Technology

Slices/ALUTs

Our proposal
Our proposal
ZUC [5]
ZUC [6]

EP4SGX230KF40C2
XC5VLX50-3FF324
XC5VLX110T
XC5VLX50-3FF324


1166ALUTs
384 slices
575 slices
385 slices

ISBN: 978-604-82-1375-6

Frequency
(MHz)
125
139
222
65

Bit rate
(Gbps)
4.0
4.45
7.1
2.08
25


×