the way these reduction proofs will work
will mostly be similar so
remember we are going to create construct
an adversary B so let me
draw a box for B
so within this box I'm going to write
the code let's say pseudocode for B
B can use this A as a subroutine
so I can draw a box for A 
here
and B can call this
A how B is going to interact
with A is defined exactly as
in the scheme X remember
the challenger and adversary based
definitions A
is going to be the adversary so it 
will recieve some particular
input from the challenger maybe send
something back
let's say recieve something again and then
finally let's say output so
in this game A will be the adversary
and we have no idea how A works
okay but B
we need to construct B so we need to
define the pseudocode here
now B will act
as simulating
the challenger to the adversary
so the code here
should look similar to the
challenger in the X's security
games security experiment
as far is A is concerned
furthermore remember we have no idea how A works
the only thing B knows is that
A is going to behave let's say
according to this game so A will send some
message
as defined in this game and then let's
say
A's output will make sure that
A wins this game with some good probabilty
those are the only things we can assume for
B
on the other hand there's the game
the security
associated with the scheme Y now
B as far as the scheme Y is concerned
needs to behave like an adversary and
it will interact with some outside
challanger that is defined for the
scheme Y
so this outside challenger is going to give
B let's say something according to the
Y's security game maybe B will
send something to the challenger receive it
back
and then let's say also B needs to output
something at the end to win the game
now this challenger there is 
a well defined code here
and this code is defined
by the challe nger of the scheme Y
so we know the scheme Y's game we know
what's going to happen here
we don't know what's going to happen
inside A but we know
that this interaction will take place we know for scheme 
Y this interaction is going to place
take place
so the interaction here is
defined by scheme Y
the interaction here is defined by
scheme
X and B's goal
overall is to somehow
write down its code such that
let's say these messages will somehow be
tied to the messages OK
and at the end if
A wins this game hopefully what we
want is B wins
this game now they're very important rules here
remember we need a PPT
adversary B so
what it means here is the following we are
assuming
A itself is already PPT so we 
don't know the code of A
but we know whatever happens is PPT if
A's running PPT this
means there are at most polynomially 
many such interactions as well 
so these interactions
all of them will be at most
polynomially many
now A is a subroutine of B
so B willl be incurring all
this time
everything here is PPT so don't worry
now this interaction here must also be
PPT
so A must only interact
PPT times with its challanger
sorry B must interact polynomially
many times with its challenger
and the code for B here
this whole thing going on here must
also be PPT so
number one rule for reductions
is that we need to show
that B we construct must be
PPT number two rule
is about simulation
what are we simulating remember
B is simulating
this challenger for the adversary
so all this interaction
here as far as A is concerned
it should be essentially
indistinguishable
from what a real challanger
would have done in the game defined for
X so
B's behavior in terms of
its interaction with A should look
like
the behavior of the challanger in
X's game
and then we have a third condition
the third condition has something to do
with
probability of winning
now remember what we said
so here we're assuming
A wins the game for X so for example
if the game for X required
that A guesses this bit let's say
for the eavesdropper security of encryption
with 1/2 + neg(n) probability
winning that would mean A achieves it
A guesses the correct bit with 1/2
plus some negligible
let's say probabilty
now let's say
B's winning condition
for scheme Y was that it needs to
find something let's say with
some non-negligible probabilty what we need to
show is that
if A wins this game meaning let's say
A finds this thing with 1/2 + non-neg(n) probabilty
then remember B takes it runs through some code and
output its response B must
also win its game lets say with non-negligible
advantage so
if A has
non-negligible advantage
then this
must imply that B has
non-negligible advantage in winning
its own game
remember A wins the game for
X, B is going to win the game for
Y. For
every reduction first
you provide this code and then
you need to analyze these three points
show that
everything you do is PPT
show that B is indeed simulating the
challenger
for scheme X for the adversary and show that
in terms of winning probabilties
if A wins its game B wins
its game okay now
remember our reasoning here again in
terms of contrapositive
what this would mean is the following since
we don't know any such algorithm B that has
this non-negligible let's say winning 
advantage all the algorithms we know
as B meaning they're trying to break
scheme Y they have only negligible
advantage. Now as for the contrapositive
if B, all algorithms B have
negligible advantage then this means
all algorithms A must also have negligible advantage
Why? remember this was a THERE EXISTS
condition when you go to the contrapositive it 
becomes a FOR ALL condition if all algorithms B
have only negligible advantage
because scheme Y is secure
then it implies that
all algorithms A must have
a negligible advantage as well and this now
concludes our proof because if
all algorithms A must have negligible
advantage in breaking
X of course assuming that Y is secure
then we are done. We already proved
if Y is secure then X must
be secure
