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

Crypto Lab 2011 Code Challenge Website Report v1 0

2019 | 3 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

Introduction to ILWIS3 - National Centre of Excellence in ...

Introduction to ILWIS3 - National Centre of Excellence in ...

ILWIS Reference Guide Detailed description of the functionality of ILWIS including its window types, objects, operations. ILWIS User’s Guide Training the skills you need in ILWIS, including explanations and procedures for first time users in addition to topics for advanced users. ILWIS Applications Guide Advanced procedures to work with ILWIS,

Continue Reading...
Systèmes d'informations géographiques et gestion des ...

Systèmes d

précisément de PC ARCANFO, d’IDRISI et d’ILWIS. La deuxième partie est consacrie 2 une étude de cas dans le département de Kédougou (sud-est du Sénégal), avec illustration des fonctionnalités du SIG ILWIS pour la gestion des informations relatives aux sols. Dans la dernière partie, l’accent est mis sur les problèmes posés par

Continue Reading...
Introduction to ILWIS 3 using a data set from Northen ...

Introduction to ILWIS 3 using a data set from Northen ...

Introduction to ILWIS 3 using a data set from Northen Pakistan. Summary & background The exercises in this chapter are modified from the ILWIS Users Guide, by substituting the original data with data from Pakistan. ? These exercises are intended to bring all participants to a common level, and allow them to

Continue Reading...
Tutorial - Basic GeoTIFF manipulation using ILWIS 1.1 ...

Tutorial - Basic GeoTIFF manipulation using ILWIS 1.1 ...

To facilitate the image interpretation, let’s add an ILWIS basemap _. The basemaps are shapefiles converted to ILWIS format. In the upper menu of the visualization window, click on “Layers” -> “Add Layer”. The ^Add Data Layer _ window will be opened. Find the ILWIS folder basemaps _ (in the example below, it is found at

Continue Reading...
Introduction to ILWIS 3 - ADPC

Introduction to ILWIS 3 - ADPC

1 1 Introduction to ILWIS 3.11 Cees van Westen Dinand Alkema International Institute for Geo-Information Science and Earth Observation (ITC), Enschede, The Netherlands.

Continue Reading...
ILWIS 2.1 for Windows - birdlist.org

ILWIS 2.1 for Windows - birdlist.org

The ILWIS 2.1 software package is protected against unauthorised use by a unique hardware key. ILWIS 2.1 software can be executed only when this hardware key is plugged in properly and your unique registration code is entered (see the installation procedure). Do not lose or damage the hardware key, without this key

Continue Reading...
User’s Guide

User’s Guide

ILWIS 3.0 Academic User’s Guide Unit Geo Software Development Sector Remote Sensing & GIS IT Department International Institute for Aerospace Survey and Earth Sciences (ITC)

Continue Reading...
ILWIS 2.1 for Windows

ILWIS 2.1 for Windows

The ILWIS Applications Guide contains discipline oriented case studies, and is intended for those who want to know how ILWIS 2.1 can be used for specific problems in various disciplines. The ILWIS Applications Guide is meant for experienced ILWIS 2.1 users. Therefore, the descriptions of the operations to be carried out, are not fully written

Continue Reading...
ILWIS 3.8 Map Visualization Based on ILWIS 3.8

ILWIS 3.8 Map Visualization Based on ILWIS 3.8

ILWIS 3.8 saw a massive change in how layers are drawn in the ILWIS map window. The 3.8.1, 3.8.2, 3.8.3 were incremental versions, improving and slightly extending the model that was introduced in 3.8. This document contains a description of all the options that are available in ILWIS 3.8.3 for the visualization of spatial data sets. It is not ...

Continue Reading...
Guide for Bronze Award Participants

Guide for Bronze Award Participants

The Bronze Award is the first step to getting involved in The Duke of Edinburgh’s International Award and you can then continue your Award by . getting involved at Silver and then Gold levels. i n. g a t i i n g e, d g a . Buckingham Palace Welcome to your Award challenge A note from the Founder of the Award, His Royal Highness The Duke of Edinburgh KG KT: 2. Guide for Bronze Award ...

Continue Reading...