Crypto Lab 2011 Code Challenge Website Report V1 0 -Books Download

Crypto Lab 2011 Code Challenge Website Report v1 0

2019 | 40 views | 16 Pages | 2.22 MB

Crypto Lab 2011: Code Challenge Website - Report (v1.0) Marius Hansen and Daniel Quanz {hansen_m,quanz}@rbg.informatik.tu-darmstadt.de 1 Features / Use Cases



2 Crypto Lab 2011
For large values of n the last term dominates the sum so the condition is often
approximated by
q 1 t0 q r
If the number of errors that have to be corrected is smaller than the GV bound
then there is at most one solution Otherwise there can be several solutions 2
Algorithm 1 Calculate H e 0 column wise multiplication 3 p 6
Require H r n ai j 1 i r 1 j n ai j 0 1
Require e Fn 2
result 0 0 r
for j 1 n do
if ej 1 then
for i 1 r do
resulti resulti ai j
return result
Submission of a solution The actor should use a form to submit his solution
He has to input his name his email address his solution and a description how
he has solved this challenge Each challenge has its own submission form
Listing of solutions in a Hall of Fame If the actor has submited a solution
he will listed in the Hall of Fame list It is not possible to submit a duplicate
Notification system This feature is needed to inform the website administra
tor The admin will be notified if the Hall of Fame is changed It is possible to
notify several people
1 2 Use Cases
Figure 1 shows a short overview of all actions of the code challenge website
2 Implementation
In this lab we decided to use Ruby on Rails RoR an open source web appli
cation framework for the Ruby programming language In 1 you find a nice
step by step tutorial to create RoR projects
Crypto Lab 2011 3
Fig 1 Code Challenge Website Use Cases
2 1 Basics
Each RoR project is structured as follows
app includes the RoR application
app controllers includes the application controllers MVC
app helpers includes application helpers
app mailers includes application mailers
app models includes application models MVC
app views includes application views MVC
config includes the RoR application config files
db includes the application databases and migration files
doc includes the application documentation
log includes application logs for each environment
public includes the application public files CSS Javascript images
test includes tests of the RoR application
2 2 Database
The user input is stored in a sqlite3 database For this application we need two
different tables Figure 2 shows the relation of these two tables
4 Crypto Lab 2011
Fig 2 DB relationship
r number of rows of a binary matrix H
n number of columns of a binary matrix H
seed input for a PRNG to create a random binary matrix H
bound value of the GV bound of H
created at Creation date
updated at date of the last update
e solution vector
t weight of solution vector
name name of solver
mail email address of solver
description Description how to solve the solution
challenge id foreign key to challenge
created at Creation date
updated at date of the last update
2 3 Creation of random challenges matrices
To create a new challenge we need a random binary r n matrix H The user
has to input to positve integeres r and n such that r n These values will
be saved in the Challenge SQLite3 table In addition the Gilbert Varshamov
GV bound will be computed and the seed will be defined Lines 5 6 in Listing
1 1 In line 62ff you find the implementaion of th GV bound computing
The binary matrix is not created yet It will be generated if the user wants
to download it The file that stores the matrix is created temporarily to save
Crypto Lab 2011 5
2 4 Download a challenge
The challenge downlod is implemented in listing 1 2 14 36 First we read the
needed attributes r n seed from the database Then we create a temporary
file In this file we write the generated binary matrix
2 5 Verification of a solution
The feature Verification of a solution is implemented in Listing 1 3 First
we validate the user input The user has to input his name line 6 his email
address line 7 and a valid solution vector A solution vector must be unique for
a challenge line 8 must be a binary string line 9 the weight of the solution
vector must be lower or equal the GV bound of the challenge matrix line 10
and finally the multiplication H r n e must be zero line 11
2 6 Pages and links of the website
Home This one is the welcome page There you find the rules and how you
can participate You can also find the TOP 5 of the Hall of Fame List
url to website home
Hall of Fame You can find the whole high score list
url to website halloffame
Create a Challenge On this page the user is able to create a new challenge
url to website generate
Available Challenges You can find a list of available challenges to download
url to website challenges
Download challenge CID You can find a list of available challenges to
download them
url to website challenges CID
Submit a solution for challenge CID You can find a list of available
challenges to download them
url to website challenges CID solutions new
Show solution SID for challenge CID You can find a list of avail
able challenges to download them
url to website challenges CID solutions SID
2 7 Configuration
You find the configuration file of the webpage in conf ig conf ig yml The table
below lists the config attributes Each attribute is stored in the APP CONFIG
6 Crypto Lab 2011
attribute Description
challenge gvbound tolerance GV bound tolerance in percent here
challenge max columns the number of the max n
challenge download name prefix a prefix name for the challenge file
challenges per page number of challenges to be listed per
home highscore number number of hall of fame entries on the
welcome page
highscore per page number of solutions per page in the hall
notifier mail from notification from mail address
notifier mail to notify to mail address
notifier mail subject notifier mail subject
References
1 M Hartl Ruby on Rails 3 Tutorial Livelessons Bundle Learn Rails by Example
LiveLessons Series ADDISON WESLEY PEAR 2011
2 Robert Niebuhr Pierre Louis Cayrel Stanislav Bulygin and Johannes Buch
mann On lower bounds for Information Set Decoding over Fq http www cdc
informatik tu darmstadt de rniebuhr publications ISD Fq pdf
3 Falko Strenzke How to implement the public key operations in code based cryptog
raphy on how to implement the public key operations in code based cryptography
on memory constrained devices eprint iacr org 2010 465 pdf 2010
A Implementation listings
2 Model f o r c h a l l e n g e
4 author Marius Hansen D a n i e l Quanz
7 c l a s s C h a l l e n g e A c t i v e R e c o r d Base
9 has many s o l u t i o n s
11 validates numericality of r a l l o w n i l f a l s e
greater than or equal t o 1 l e s s t h a n o r e q u a l t o
n o n l y i n t e g e r true
12 validates numericality of n a l l o w n i l f a l s e
greater than or equal t o 1 l e s s t h a n o r e q u a l t o
APP CONFIG c h a l l e n g e m a x c o l u m n s o n l y i n t e g e r
Crypto Lab 2011 7
14 b e f o r e s a v e on c r e a t e do
15 s e l f s e e d Time now
16 s e l f bound getGVt s e l f n s e l f n s e l f r
19 def s e e d
20 return r e a d a t t r i b u t e s e e d
24 return r e a d a t t r i b u t e r
28 return r e a d a t t r i b u t e n
31 def bound
32 return r e a d a t t r i b u t e bound
35 private
38 s i m p l e compution o f f a c t o r i a l
40 def f a c t n
41 return n 0 1 1 n i n j e c t
45 compution o f b i n o m i a l c o e f f i c i e n t
47 def binom n k
48 return n k k 0 1 f a c t n f a c t n k f a c t k
52 q ary G i l b e r t Varshamov bound u p d a t e d t o 2 ary
56 Paper On l o w e r bounds f o r I n f o r m a t i o n S e t Decoding o v e r
57 by R o b e r t Niebuhr 1 P i e r r e L o u i s C a y r e l 2 S t a n i s l a v
B u l y g i n 2 and Johannes Buchmann 1 2
58 1 TU Darmstadt F a c h b e r e i c h I n f o r m a t i k
K r y p t o g r a p h i e und C o m p u t e r a l g e b r a
8 Crypto Lab 2011
59 2 CASED Center f o r Advanced S e c u r i t y Research
62 def getGVt n k
63 i f k 1
64 return n 2
66 qr 2 n k 1
67 s t e p 2 n 2 t o s 2 l e n g t h 1
69 while s t e p 1 do
70 tempd l a s t
71 while getGVtLargeN n tempd qr tempd n do
72 l a s t tempd
73 i f tempd s t e p n
74 tempd s t e p
76 tempd n
79 s t e p 1
82 while getGVtSmallN n tempd qr do
83 tempd 1
85 return tempd 1
88 def getGVtLargeN n tempd
89 return binom n tempd
92 def getGVtSmallN n tempd
93 return 0 tempd map i binom n i i n j e c t
Listing 1 1 Challenge model
1 require tempfile
3 class ChallengesController ApplicationController
4 GET c h a l l e n g e s
5 GET c h a l l e n g e s xml
6 def i n d e x
7 c h a l l e n g e s C h a l l e n g e p a g i n a t e page params page
p e r p a g e APP CONFIG c h a l l e n g e s p e r p a g e o r d e r
c r e a t e d a t DESC
Crypto Lab 2011 9
9 r e s p o n d t o do format
10 format html i n d e x html e r b
14 def show
15 c h a l l e n g e C h a l l e n g e f i n d params i d
16 prng Random new c h a l l e n g e s e e d
18 f i l e T e m p f i l e new c h a l l e n g e
20 data c h a l l e n g e r t o s n c h a l l e n g e n t o s n n
21 f i l e w r i t e data
22 f o r i in 1 c h a l l e n g e r
23 data c h a l l e n g e n t i m e s map prng rand 0 1
24 f i l e w r i t e data j o i n n
28 s e n d f i l e f i l e f i l e n a m e APP CONFIG
c h a l l e n g e d o w n l o a d n a m e p r e f i x ID params i d
c h a l l e n g e r c h a l l e n g e n t x t
31 f i l e close
32 f i l e unlink
33 r e s p o n d t o do format
34 format html r e d i r e c t t o c h a l l e n g e s p a t h
39 GET c h a l l e n g e s new
40 GET c h a l l e n g e s new xml
41 def new
42 c h a l l e n g e C h a l l e n g e new
44 r e s p o n d t o do format
45 format html new html e r b
49 POST c h a l l e n g e s
50 POST c h a l l e n g e s xml
51 def c r e a t e
52 c h a l l e n g e C h a l l e n g e new params c h a l l e n g e
54 r e s p o n d t o do format
55 i f challenge save
10 Crypto Lab 2011
57 format html r e d i r e c t t o c h a l l e n g e s p a t h n o t i c e
You c r e a t e d a new b i n a r y c h a l l e n g e r x
c h a l l e n g e n matrix ID c h a l l e n g e i d
Download i t v i e w c o n t e x t l i n k t o h e r e
challenge html safe
59 format html r e n d e r a c t i o n new
64 DELETE c h a l l e n g e s 1
65 DELETE c h a l l e n g e s 1 xml
66 def d e s t r o y
67 c h a l l e n g e C h a l l e n g e f i n d params i d
68 challenge destroy
70 r e s p o n d t o do format
71 format html r e d i r e c t t o c h a l l e n g e s u r l
Listing 1 2 Challenge Controller
1 c l a s s S o l u t i o n A c t i v e R e c o r d Base
3 belongs to challenge
5 no d u p l i c a t e s o l u t i o n v e c t o r
6 v a l i d a t e s name p r e s e n c e true
7 v a l i d a t e s mail p r e s e n c e true format with
s a z0 9 a z 2 i l e n g t h
w i t h i n 5 2 5 5
8 v a l i d a t e s e p r e s e n c e true u n i q u e n e s s s c o p e
challenge id
9 v a l i d a t e hasValidContent
10 v a l i d a t e gvBoundAndESize
11 validate multiplyIsZero
13 b e f o r e s a v e on c r e a t e do
14 self t countErrors
17 def gvBoundAndESize
18 bound c h a l l e n g e bound
19 b bound bound APP CONFIG
challenge gvbound tolerance
Crypto Lab 2011 11
21 puts countErrors
22 i f e l e n g t h c h a l l e n g e n
23 e r r o r s add e has not t h e c o r r e c t l e n g t h The l e n g t h
o f e i s e l e n g t h but i t must be c h a l l e n g e n
24 return f a l s e
27 if 1 b include countErrors
28 e r r o r s add e i s not a non z e r o v e c t o r o r w e i g h t e
1 1 GVbound 1 1 GVbound b w e i g h t e
countErrors
29 return f a l s e
33 def m u l t i p l y I s Z e r o
35 prng Random new c h a l l e n g e s e e d
36 r Array new c h a l l e n g e n 0
38 data c h a l l e n g e r t i m e s map c h a l l e n g e n t i m e s map
prng rand 0 1
39 matrix data t r a n s p o s e
40 vec c o n v e r t S t r i n g 2 D i g i t A r r a y e
41 0 upto c h a l l e n g e n 1 do i
42 i f vec i 1
43 r matrix i z i p r c o l l e c t t k t t o i k t o i
47 i f r i n j e c t 0
48 e r r o r s add e i s not a s o l u t i o n He 0
49 return f a l s e
52 return true
55 def h a s V a l i d C o n t e n t
56 c h e c k each e l e m e n t i s w i t h i n r an g e 0 1
57 vec c o n v e r t S t r i n g 2 D i g i t A r r a y e
58 i f v e c n i l v e c l e n g t h 0
59 e r r o r s add e i s b l a n k
60 r e t u r n f a l s e
62 b o o l vec map e l 0 1 i n c l u d e e l i n j e c t
63 i f bool
64 e r r o r s add e i s not a b i n a r y s t r i n g
66 return b o o l
12 Crypto Lab 2011
69 def c o u n t E r r o r s
70 count a l l 1
71 eVector c o n v e r t S t r i n g 2 D i g i t A r r a y e
72 return eVector i n j e c t
75 def c o n v e r t S t r i n g 2 D i g i t A r r a y e
76 i f e nil
77 return n i l
79 c o n v e r t d i g i t s t r i n g t o t o a d i g i t a r r a y
80 return e s p l i t map t o i
Listing 1 3 Solution model
B Screenshots
Crypto Lab 2011 13
Fig 3 Welcome page
14 Crypto Lab 2011
Fig 4 List of challenges
Fig 5 New challenge created
Crypto Lab 2011 15
Fig 6 Hall of Fame


Related Books

Crypto Lab 2011: Code Challenge Website - Report (v1.0)

Crypto Lab 2011: Code Challenge Website - Report (v1.0)

In this lab we decided to use Ruby on Rails (RoR), an open source web appli-cation framework for the Ruby programming language. In [1] you nd a nice step-by-step tutorial to create RoR projects. Crypto Lab 2011 3 Fig.1. Code Challenge Website Use Cases 2.1 Basics Each RoR - project is structured as follows: app includes the RoR application app/controllers includes the application controllers ...

Continue Reading...
Lecture 12: Public-Key Cryptography and the RSA Algorithm ...

Lecture 12: Public-Key Cryptography and the RSA Algorithm ...

Factoring Challenge 12.10.1 The Old RSA Factoring Challenge: Numbers Not Yet Factored 81 12.11 The RSA Algorithm: Some Operational Details 83 12.12 RSA: In Summary .... 94 12.13 Homework Problems 96 2. Computer and Network Security by Avi Kak Lecture12 Back to TOC 12.1 PUBLIC-KEY CRYPTOGRAPHY •Public-key cryptography is also known as asymmetric-key cryptography, to distinguish it from the ...

Continue Reading...
Blockchain for the Enterprise: Hyperlegder-fabric

Blockchain for the Enterprise: Hyperlegder-fabric

• Research Focus: Applied Crypto, Cloud (Storage) Security, Blockchain Security • Me & Blockchain: • Research on Security of Bitcoin since 2011 • IBM Global Technology Outlook 2014 (2013) • Authored Book on “Bitcoin and Blockchain Security” (2016)

Continue Reading...
SANS Institute Information Security Reading Room

SANS Institute Information Security Reading Room

(Kaspersky Lab: sensitive corporate information is increasingly at risk from mobile malware, 2011) . Social networking is another popular platform that facilitates a variety of threat vectors . With ov er 500 million active users, half of which are logging in each day (Facebook, 2011) it is clear why attacks target these users : the odds are good . From friend requests to viral videos, the ...

Continue Reading...
An Evaluation of Forensic Similarity Hashes - DFRWS

An Evaluation of Forensic Similarity Hashes - DFRWS

An Evaluation of Forensic Similarity Hashes By Vassil Roussev From the proceedings of The Digital Forensic Research Conference DFRWS 2011 USA New Orleans, LA (Aug 1st - 3rd) DFRWS is dedicated to the sharing of knowledge and ideas about digital forensics research. Ever since it organized the first open workshop devoted to digital forensics in 2001, DFRWS continues to bring academics and ...

Continue Reading...
Bit-Sliding: A Generic Technique for Bit-Serial ...

Bit-Sliding: A Generic Technique for Bit-Serial ...

Bit-Sliding: A Generic Technique for Bit-Serial Implementations of SPN-based Primitives 28. Sep. 2017 Jérémy Jean, Amir Moradi, Thomas Peyrin, Pascal Sasdrich ANSSI Crypto Lab, Paris, France Ruhr University Bochum, Germany Temasek Laboratories, Nanyang Technological University, Singapore

Continue Reading...
Defeating mTANs for profit

Defeating mTANs for profit

lab phone 2 Defeating mTANs for pro t - A. Apvrille, K. Yang17/23. Remote debugging Symbian phones Defeating mTANs for pro t - A. Apvrille, K. Yang18/23 . Zitmo’s Hidden Debug Window (listen - new stu here! ) Un-hide text editor window CApaWindowGroupName::SetHidden(EFalse ) Modify ETrue=1 to EFalse=0. Bring window in front position RWindowTreeNode::SetOrdinalPosition ...

Continue Reading...
Atmel Crypto Athentication ATSHA204 - EEWorld

Atmel Crypto Athentication ATSHA204 - EEWorld

Robust Crypto Algorithm SHA256 MAC, HMAC Advanced Multi-Level HW Security Active shield over entire chip All memories internally encrypted Internal state consistency checking Security protocols hard coded Supply tamper protection Internal clock generation Secure test methods, no JTAG No debug probe points, no test pads Designed to Defend Against: ‘Dumpster-diving’ attacks Microprobe ...

Continue Reading...
Breaking Hardware-Enforced Security with Hypervisors

Breaking Hardware-Enforced Security with Hypervisors

Breaking Hardware-Enforced Security with Hypervisors Joseph Sharkey, Ph.D. Chief Technology Officer / Vice President of Advanced Programs Siege Technologies www.siegetechnologies.com This work was sponsored in part by the Air Force Research Laboratory (AFRL) and Air Force Office of Scientific Research (AFOSR) under contracts FA8750-C-0235, FA9550-11-1-0267, and FA9550-14-C-0019. Presentation ...

Continue Reading...
Strong Authentication for Physical Access using Mobile Devices

Strong Authentication for Physical Access using Mobile Devices

Strong Authentication for Physical Access using Mobile Devices DoD Identity Protection and Management Conference May 15-17, 2012 Dr. Sarbari Gupta, CISSP, CISA [email protected] 703-437-9451 ext 12 . Page 2 Unclassified Agenda Establishing Context Need for Strong Authentication for Physical Access Mobile Device Capabilities Authentication using Mobile Devices Strengths and Weaknesses ...

Continue Reading...
Airborne Warning and Control System (AWACS)

Airborne Warning and Control System (AWACS)

PE 0207417F: Airborne Warning and Control System (AWACS) COST ($ in Millions) FY 2011 FY 2012 FY 2013 Base FY 2013 OCO FY 2013 Total FY 2014 FY 2015 FY 2016 FY 2017 Cost To Complete Total Cost Total Program Element 201.838 117.880 65.200 - 65.200 192.562 173.544 66.079 57.349Continuing Continuing 67411L: Airborne Warning & Control System (AWACS)

Continue Reading...