Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ú
Úvod do kryptografie
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Úvod do kryptografie
Commits
13d0df8e
Commit
13d0df8e
authored
2 months ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Teorie čísel: Efektivní CRT
parent
dfc409bc
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
02-perfect/perfect.tex
+1
-1
1 addition, 1 deletion
02-perfect/perfect.tex
07-teorie-cisel/teorie-cisel.tex
+24
-0
24 additions, 0 deletions
07-teorie-cisel/teorie-cisel.tex
with
25 additions
and
1 deletion
02-perfect/perfect.tex
+
1
−
1
View file @
13d0df8e
...
...
@@ -189,7 +189,7 @@ Pokud se sejde méně než~$\ell$, v~každé $\ell$-tici nějaká část chybí,
takže z~žádné
$
\ell
$
-tice se nic nedozvíme.
}
\subsection
{
Shamirovo schéma
}
\subsection
[shamir]
{
Shamirovo schéma
}
Efektivní konstrukci
$
(
k,
\ell
)
$
-schémat popsal v~roce 1979 Adi Shamir.
Začneme triviálním případem.
...
...
This diff is collapsed.
Click to expand it.
07-teorie-cisel/teorie-cisel.tex
+
24
−
0
View file @
13d0df8e
...
...
@@ -376,6 +376,30 @@ Dále pokračujeme indukcí podle~$k$, přičemž případ pro $k=2$ použijeme
jako indukční krok.
\qed
Nám se ovšem bude hodit i konstruktivní důkaz, který nám umožní hledané~
$
x
$
efektivně najít.
\theoremn
{
Efektivní CRT
}{
$
f
\inv
(
a
_
1
,
\ldots
,a
_
k
)
$
lze spočítat v~čase
$
\O
(
kb
^
2
)
$
.
}
\proof
Větu opět stačí dokázat pro
$
k
=
2
$
a pak použít indukci.
Inspirujeme se Lagrangeovou interpolací z~oddílu
\secref
{
shamir
}
.
Pokud bychom znali čísla
$
u
_
1
$
a~
$
u
_
2
$
taková, že
$
f
(
u
_
1
)
=
(
1
,
0
)
$
a
$
f
(
u
_
2
)
=
(
0
,
1
)
$
, řešením je jejich lineární kombinace
$
x
=
(
a
_
1
u
_
1
+
a
_
2
u
_
2
)
\bmod
N
$
.
Jelikož
$
f
$
je homomorfismus, je lineární. Proto platí:
$
f
(
x
)
=
a
_
1
f
(
u
_
1
)
+
a
_
2
f
(
u
_
2
)
=
a
_
1
(
1
,
0
)
+
a
_
2
(
0
,
1
)
=
(
a
_
1
,a
_
2
)
$
.
Zbývá si pořídit~
$
u
_
1
$
(
$
u
_
2
$
~najdeme obdobně)
Nejprve si všimneme, že
$
f
(
N
_
2
)
=
(
v
_
1
,
0
)
$
pro nějaké~
$
v
_
1
$
.
Pokud je
$
v
_
1
=
1
$
, položíme
$
u
_
1
=
N
_
2
$
a jsme hotovi.
Jinak najdeme multiplikativní inverzi~
$
w
_
1
$
čísla
$
v
_
1
$
modulo~
$
N
_
1
$
a položíme
$
u
_
1
=
w
_
1
N
_
2
$
. Bude platit
$
f
(
u
_
1
)
=
f
(
w
_
1
N
_
2
)
=
w
_
1
f
(
N
_
2
)
=
w
_
1
(
v
_
1
,
0
)
=
(
w
_
1
v
_
1
\bmod
N
_
1
,
0
)
=
(
1
,
0
)
$
.
\qed
\subsection
{
Eulerova funkce
}
Už jsme zavedli funkci~
$
\varphi
(
n
)
$
, která udává, kolik prvků ze~
$
Z
_
n
$
je nesoudělných s~
$
n
$
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment