PSE Lectures Ep 28 - Derivations on an elliptic curve

PSE Lectures: Elliptic Curve Cryptography · 29 Oct 2024 · 1:43:38

This lesson covers Derivations on an elliptic curve in PSE’s foundational course on elliptic-curve cryptography. It develops the algebraic concepts needed to understand curves, torsion points, pairings, and modern proof systems.

Speakers

Topics

From PSE Lectures: Elliptic Curve Cryptography, hosted by Privacy Stewards of Ethereum.

Transcript

okay so today I want to continue the study of um the multiplication by n map and um it just is a reminder of what we did uh last time so last time we proved the theorem that says I mean um so we Prov the theorem um I mean we take

the multiplication by n map and we this is two it has two coordinates so um GN H in and it we showed that GN over X evaluated at o is 1 over n² and h n divid by y evaluated at o is 1 / n

Cub now there is a coroller um that um requires a notion we talked about H that is a leading coefficient so a note um the function the the rational function X over

y has um a simple poll at o that is a poll of um er multiplicity one and the reason is that the the degree here is two and the degree here is three so when you if you want like a euristic reason um we I mean when we uh I mean instead of X we we can substitute Infinity H square and in instead of Y

Infinity Cube and then we get one over infinity this is like a simple po this multiplicity one um and if I have a rational function um then I can take X over y to the power of minus the order of r at o and I multiply it by

R and and this function I mean R has um either a zero or a pole or I mean the order of r at o is is a is this a purple sorry orange number and so when I multiply e x over y um to the power of this of minus of this order I can out I have no Zer and no poles so the the claim is that this function has

is is finite and non zero at all okay so this this is a this is a small trick and and but if it is finite and non zero we might as well ask what is what is its value at all and its value is called the leading coefficient the leading

coefficient of P R is um L LC of R is exactly this this function X over y to minus of the order of O at R time R and all that evaluated at o okay and as an example you take we take R to be um

let's say 2 x² + 7 x ided by 2 YX + 2 so to calculate the leading coefficient of R I need to calculate the order of um of r at at at all so um we can write I mean for um U equal x over y a uniform at

o we can write um X over y to the minus1 time R this is um 2 y x² + 7 YX divided by 3 y x² + 2x H and so we get that the the order of r at o is minus one

is a yeah I'm just checking if it is minus one or or one but yeah YX has degree five and x square has degree four so o is is a pole of R hence the order is minus one and evaluating um so now I I want to

evaluate um yeah actually maybe here there's an issue so now I need to evaluate um the X over y to the to the to the one times uh 2x² + 7 x ided by 2 YX + two [Music] um yeah but I have an issue

[Music] okay let let me let me postpone this uh this example and now we um I don't want to spend too much time on on correcting it um my claim is that with this definition of leading coefficient ER we can calculate the leading coefficient of G GN and hen and the the leading coefficient

I guess we can simply write it like this one is that the leading coefficient of GN is 1 / n² and two the the leading coefficient of hn is 1 over NQ now how do we prove this um the

theorem shows that um G and has a pole a double pole at o and the reason is as follows I mean I I take the uniformize X over Y at o and I can write GN as X over y to the minus 2-

2 time X Cub / Y 2 time GN over X you see what I did here I mean I just uh added an I mean I um added the some X terms and some y terms to the numerator and denominator and they all cancel out but this is like U to the minus 2 and this this is a

function that is um is finite and non zero at o um what is the value can anybody can anybody say what is the value of this function at

o i mean remember if you take the value the the theorem says that if you take GN ided by X and you evaluate it o you get 1 / n Square so what do I get if I evaluate this product at the point at Infinity yeah yeah yeah the same and why this here should be y s well because the left side is going to equal to one because Infinity over infinity yeah it's like a but the reason

that X CU so I claim that this is you can write it as X Cub / y² evaluated at o times GN ided by X evaluated at o the reason you can do it is because both of them are this is n² sorry 1/ n² and this is one you see you see what why it is one there now yes because like each of them has like the degrees two and three

respectively so then like when you like the x is degree two and Y is degree three so since you are powering them to three and two then all of like the thing is like power to six divided by 4 to six yeah exactly exactly so so this is one over n squ but we don't care exactly about the value all we need in order to calculate the the multiplicity of a pole we need uniformize to to some degree times a um a function that is finite and non zero at at this point so we conclude that um

the order of GN at o is is minus 2 H now [Music] um Okay so now let's compute the the leading coefficient the leading coefficient is X over y to the to the two times GN evaluated at

o so how do I do this this I mean this is like x² / y² times but I what I know to evaluate at o is GN / X so I I do GN over X here and then here I do x x Cub okay evaluated at o and this is what we just did this is 1 / n² okay and um exercise show show the the second part

okay so that's a that that is going to to be quite useful ER when we study this GN and and AG in but uh um there is one caveat that I forgot to mention so that is if n is prime to the characteristic of the field okay otherwise it's not true this is also something that I should have said in um when I restated ethereum so

this is also if n is prime to p now in now we talked about at the end of the last session we started to talk about derivations so I want to remind you what's what's going on

um we want um some kind of operator that will behave like a deriving rational functions on E in a in a formal sense because we don't really have analysis this is a this is supposed to be applicable to rational functions over finite fields and then you don't really have like a um you know limit and the usual the usual things that you have in analysis but nevertheless we want an operator which I will call

derivation um and we wanted to satisfy the usual the usual axioms that we are or the usual properties that were used from derivatives of in ordinary analysis um so so first we want that D of the constant rational function is going to be zero for any element in the field two we wanted the derivative or the derivation of a sum of rational

functions is the sum of the derivations three is that if I do derivation of constant times rational function I get constant times the derivation of this rational function and finally we want that the derivation of a product is um Dr times

S Plus R * DS and furthermore we want I mean in K of e the polom um let's say y^ 2 - x CU - A xus B is equal to zero and the derivation of zero needs to be I mean Zero by axum

one so if I do derivation of of this polinomial I need to get zero and and this this means um I mean if you derive you do 2y Dy needs to be equal to 3 X sare + a DX and so so um I set up Axiom number five um to be the DX is going to be 2

Y and the Dy is going to be 3 x² + a and then equation star is going to be true and this axioms five and six can be a little counterintuitive because the degree of X is two and the degree of Y is three and usually in in high school analysis when you derive a polom you decrease the degree but here because of our special

setup we in fact increase the degree when we do derivation okay now I I claim that there is only one a one function D that satis that satisfy all these six axom um there is a unique D

um that satisfies one up to six so the the proof is not hard you kind of pull the string I mean for any integer and let's let's start by by trying to derive e x to the N if you try to derive x to the N you

get um I mean remember you have the the aium of a product so you can you can try to derive x square if you derive x square and you use a a Axiom 4 then you get a um I mean well let me just write what needs to be true and and then I I explain a bit so this is going to be D of xn and and you can see this um by just checking a a few simple examples I mean you do D of

x² this is X DX Plus a x DX which is a 2X DX so here it's okay if you do D of X Cub it's like d of x * x² H which is D of x * x² plus h x times D of x² but D of x squ we already calculated this is 2x DX so I write here 2x DX and I get 2 x squ so I so all all in

all I get 3 x² DX and you continue by a straightforward induction you you prove this and similarly if you want to do d of y y to the N this is going to be n y to the nus1 d y and you see this is a this I didn't I didn't give it in the examples but this this also works for for negative ends

so if we have this we can then um do the derivation of x to the n y to the K because this is D of x to the N times y to the K plus a x to the N time D of Y to the k okay and and er these these terms we already calculated so but but now I can use

Axiom ER two to extend this H to to extend the derivation into any polinomial any polinomial in E so um we can extend D to any polom over e and now I want to I want to do the derivation of a um of a quotient so instead of doing

derivation of a quotient let's start with slightly easier case the derivation of one over a polom so if f is a polom what is D of 1 / f h it has to be D of f * 1 / f 2 but now I can do the derivation of a product and this has to be DF Time 1 / f

s plus f * D of 1 over f s and D of 1/ f s this is like I have DF * 1/ f square + f * D and instead of 1/ f Square I write 1/ f * 1 / f and now I have I can use the the axom that tells me what is derivation of a product and so I get DF * 1/ f s plus

f um 1 / f * D of 1 / f plus 1 / f * D of 1 / f uh so this is this these FS cancel out and and I get um DF 1/ f

s plus a 2 d 1/ f so now I look at the start and I look at the end I get like a recursive formula for D of one over F so I solve the recor it's it's very easy it's like a um I can just um I can just write D of 1 / f is equal to - 1 / f 2 time DF okay so this is just like you are

used to if you in high school if you do derivation of um one over a polom is this clear I don't want to to rush too much Nicholas are you okay now no good so then you never get rid of the DF or or or similar yeah I mean eventually you can

get rid of the D because you have axom five all right ah okay but it's convenient to to keep the D ER kind of implicit some cases okay thanks ER this is like you know it's like when I do when I write here I mean if it was usual a high school analysis D of X is one right so yeah this would be this would be H neglected I mean

cancelled but but here D of X because of axom 5 and six D of X is not one so I need to I need to keep it in the loop okay so but once I have D of one over F I also have um D of f over G you take any rational function on E it's like a qu of pols and I mean d of f over G is D of ftimes one /

G and then I do the derivation of a product using this equation but for for G instead of F and I get that the derivation of of of a quotient is D of f * G um D of G * F divided g s okay this is this is the usual formula for derivation of a quotient that that you know from high school and once I did this I I am done

because you see I I started by like like I know I mean I know by axom five and axom 6 I know what what must be D of X and D of Y and then from the rest of the axom I conclude what must be D of um of a polinomial I mean d of x to the n d of Y to the n d of x to the n y to the K that you can you can push like a coefficient here like a * x to the n y to the K that's that's not a problem and then you

you can extend it to a a polom and and eventually to a quotient of polinomial and everything that we did here is a this I think the the this is a situation in which the the the Arabic term of of algebra is really is really suitable I mean algebra was was called algebra by elisi that said that this is the the thing that must happened and in in in Arabic you say I

think and that's that's what's going on here it's like once you you set up a a a some natural aoms there is only one thing that can happen Okay so is the proof clear this this is basically the end of the proof um there is um the we we saw that you can extend D from D of X and D of Y to the whole a collection of rational functions and you can do it uniquely because you have no choice in the in the process ER you okay with the

proof all right then ER [Music] um for any H let's say I let's do it in two parts the first part is that for any R the the degree of D of R is um

larger by one than the degree of R so D in our case D increases degree in in contrary to the the ordinary High School analysis differentiation and two um if R is finite at P so is D now the proof of this is is actually

very easy I mean the first part the first part is is is immediate because we know it on the on X and on y right d of X is 2 y yeah 2 y yeah D of X is 2 y so this is increases the degree by One D of y y has degree three and x x square has degree 4 so um D of Y also increases the

degree and then you you do products and sums and so I should say actually is for any instead of R I should should have written F because degree is not really um we didn't talk about about degree of rational functions but rather on degrees of pols degree of D of f

okay so so one is immediate and for two we need to divide into two cases one if p is equal to o or let's say if p is not equal to O that's the easy case if p is not equal to O um and um R is some f over G and reduced so so so f and g do not have common H um

divisors ER then if R is finite at P then G um or p is not a root of G right because if P was a root of G then R would be nonfinite at at at p h but then I I do derivation of a of a qu

quent I get it doesn't even matter really what I get in the top but I get G Square in the bottom and if p is not a root of G then it cannot be a root of G square and hence um P well um D of f over G is finite at p

okay so this is for a p not the point at Infinity for p the point at Infinity um if R is equal to F over G reduced and um finite at all then there could be two cases one is that um

the degree of f is strictly smaller than the degree of G right this in this case what would be our o are evaluated at the point at Infinity if I have a quotient of pols one of them I mean the the numerator is is of degree smaller than the denominator

and I evaluated it at the point at Infinity what do I get exactly right so this is zero and indeed zero is finite and and two if I mean it could be that the degree of f is is simply equal to the degree of G um in case number one that's not a problem because then I

have um D of f over G this is degree sorry D of f time G minus D of G * F ID g s and I I calculate the degrees I mean the degree of f the degree of f um sorry the degree of D of f is the degree of f + one so um here I have degree of f+ one plus plus degree of G and here I have degree of

G + one plus degree of F and here I have degree of G Plus degree of G so what I get is that the the degree of the numerator um the degree of M DF * G minus DG * F it's not necessarily smaller but it's smaller equal it can it can at most be equal to the degree of g

s and hence when I evaluate D of f g at o I get I get something finite either either zero or some some finite element in the field and in the second case the second case is a bit it's a bit more tricky um in the second case it seems like we have a problem because I look at the the the derivation of the quotient me in

the second case degree f is equal to degree G let's say it's equal to n ER then the degree of the the H denominator would be 2 n and the degree of the the numerator would be um it could be 2 n + one right because the degree of f is n + one sorry the degree of D of f is n+ one degree of G is n so the product is has the the sum of

degrees but if the degree of the numerator is bigger than the degree of the denominator then when I evaluated it all it's not finite it's it's infinite so my only hope is that somehow in this difference something cancels out and indeed a um suppose the leading monomial of um f and g are um let's say um a * x to the

K time y um let's say leading monomial of F and leading monomial of G is a a it's something else but it it has to be of the same degree and so it has to be also B * x to the k y h if you want you can put y to the L here that's also fine um and then when I do when I do this um DF time G

minus DG * F I might as well I can do it for for each monomial separately so when I do D of a * x to the k y to the L time b x to the k y to the L minus D of B x to the k y to the L times a x to the k y to the

L I get zero right because the the the a here can get out and then it's it's just a d of x to the k y to the l h times a B time x to the k y to the L so the leading the leading monomials in the numerator here cancel out and that's why um the degree of the numerator is at most I mean maybe more more monomials cancel out but the degree of the numerator is at most a 2

N the degree of DF * G minus d g * f is less or equal to to to n and therefore D of f over G is finite at all okay so this this finishes the

proof um questions about the proof is it clear I mean I tried to cut it down to small pieces but maybe I can repeat if Nicholas now okay so let's let's take a break and uh in 10 minutes e

e e e

e e e

e e e

e e e

e e e

e e e

e e e

e e e e

okay can we start again so the next thing we want to do is rather Central proposition we want to be able to relate the order of um a rational function to the order of the D dation of this rational function and the claim here is

a so let R be rational function um if the order of r at P which we will denote as D is non zero and Prime to the characteristic then then the order

of the derivation of r at p is D minus one and the proof here um suppose a a u is a uniformize at

p and then I can write r equal U to the D * R times R1 and where R1 is finite and non zero ATP then I want to derive derive R but if I can express r as a product I can

simply derive the product so D of R is um D * U to the D minus1 time du time R1 plus u to the D time D of R1 and now I can I can take a a a common common factor U to the D minus one I get D *

du time R1 plus u * dr1 now when I evaluate this term at P this guy is is zero at P because u u is a uniformize at P it means that U of p is zero so um whatever D of R1 is I mean

well I need to know the d d of R1 is not Infinity but how how do I know that D of R1 is not Infinity so let's let's try to evaluate U * dr1 it it at P I want to write U at P time D of R1 at P but I can only do this if both of the the um the factors of the

product are not Infinity I mean if both of them are Infinity that's okay then they could be Infinity but if one of them them is zero and one one is infinity I I cannot do this so I need now U of p is zero so I need to know that D of R1 is not Infinity how do I know it I mean R1 at p is not Infinity right if it's not Infinity it's it's fin night

and we had the proposition you remember before the break anybody Nicholas what do you think um yeah I I don't I mean remember the proposition we had a proposition that said that if R is finite at P then also D of R is finite at P remember it it was it's here if R is finite at P then so is the

D of r you see and now I I apply this proposition not to R but to R1 R1 is assumed to be finite at P so D of R1 by the by this proposition before the break D of R1 must be finite at p is finite by previous proposition okay so whatever it is I don't care because the other factor is zero so this

is zero so in order to prove the D of r i mean we want to show remember that we we want to calculate the order of D of R and we have a guess I mean this is what the proposition says but it's also quite intuitive that the order of D of R should be um less less by one than the order of R so how do I calculate the order of D of r i mean at P I need to write it as U to the D minus one if I want to show

that the order is D minus one I need to write D of R is U to the D minus1 times something that is finite and non zero at P now this what I have in the brackets is is a sum of two things one of them this is in the Orange is is zero at P so if if I want to show that the sum is finite and non zero at P what I need to do is is to show that D of U is a a finite and non zero at P if it is the case then since R1 is

finite and non zero at p and then I will get D times um something that is finite and non zero at P times something that is finite and non zero at P so this is a plus zero so all in all I will get something um finite and un zero ATP is this is this clear I have a feeling I lost you here and now what do you think yeah um I we lost uh you're right

[Music] um I'm I'm reading the like the proof to try to um okay so let's just I mean we didn't do a lot of the proof so I mean we can just go over it I mean we want to show that you take a rational function and you take a point of course I didn't say it but a point on the curve and just like we I mean there is the I mean the the order of the rational function r at the point P this is some

some integer it if p is not a zero or a pole then this integer is zero but let's suppose that a um er p is so either a zero or a pole so this integer is is non zero either it's it's a positive or negative and we assume that this zero this integer D is prime to the characteristic then I claim I mean or the proposition claims that I mean d of R remember D is like it takes a it it'ss a rational function and it spits out another

rational function you you plug in R and you get D of R so D of R is a rational function I can I can ask what is the order of this rational function at P so is the statement okay yep thanks now okay so now we start the proof we have an assumption the assumption is that the order of of r at p is d What does it mean it means that a for a uniformize at

P I can write r as U to the D times some other rational function R1 such that R1 does not is finite and Z at P this is by definition what is order of a of a rational function and then okay but if I can write this and of course you here you at P because this is always true for a uniformize uniformer at p is always zero and now because I can write r as a

product I can I can do D of D of R is like d of a product right do you or now do you understand a this line how I did the derivation okay and now this line I just take a common factor I take U to the D minus one as as a common factor and I want to show that the the order of D of r at p is D minus one in order to show this I need a a a that I could be I would be able to express this this

rational function Dr as U to the D minus one times some other rational function that is finite and non zero at p so far is okay and in order so this other rational function you can call it R2 R2 is a sum of two things so in order to show that R2 is okay is finite and non zero at p i i can just evaluate each of the the

summons at P so first I evaluate the second summon the second summon I claim that it is zero at P this is the orange the orange thing why is it zero at p u at p is zero right this is like the the basic property of a unit forer uniformer at at p is always zero at p and then the second Factor D of R1 evaluated at P it has to be finite because we had a proposition that says

that if R is finite at P then also D of R is finite at p and so we apply this proposition to D of R1 instead of D of R and I get that U * D of R1 at P must be zero because it is zero times some finite um I mean some finite value is this clear now or no yes thank you very much thanks okay and now so in order to show that R2 at p is different is finite and non

zero I might as it's enough to show enough to show that du at p is finite zero because if it is the case I know that R1 is finite and non zero at p and it will be a product of finite and non zero rational functions okay are now Nicholas you you with

me yes okay so how do we show that du is finite and non zero at P we do the usual usual cases um one if um a p is is let's say a comma B not the point at infinity and not of order

two um then what is the uniformize the uniformize for p such p is x minus a um so what is D of u d of U is simply a 2 y right this a is a constant I I don't care about it and indeed um if I do du evaluated that P this is like 2y evaluated at P this is B sorry

2B and 2B is different is not zero because p is not of order two the the only points that have a second coordinate equal to zero is are points of order two so in this case we are fine is this clear and now second case um what is it if a a a p is a um let's say some omega comma 0

um of order two then the uniformize for points of order two is simply um why so D of U is um 3x² plus a and um 3x s + a it's I remind you this is the derivative of a the the the the ex polom of the elliptic curve

H now Omega is a root of of S of X and and not a double root since um is a is smooth um and hence um Omega cannot be a root of um of the derivative of S Prime

X ER which means that duu at p is some finite value that is non zero is this part clear or now what do you think yes the thing that I don't remember like the the so e is smooth and this

mean so this so what yeah so if you remember when we talked about the the the the in the very start of elliptic curves a the the definition of elliptic curve has a condition that the discriminant is non zero okay discriminant of the curve being non Zer the discriminant is is is something that is related to this s SX you remember s x is simply s x is like the X Cube plus a X Plus okay and and the

discriminant I forgot the formula actually but the discriminant being non zero means that this polinomial s of x has no double roots I mean it has three over the algebraic closure it has three distinct Roots okay so I'm claiming and this this is what we call smoothness this is a because it was it was equivalent to the condition that you you have a we have a welldefined tangent line at every Point okay I see thanks and now okay so if p is of order two then it is of the

form Omega comma 0 where where Omega is a root of s of X right it's like the it's like these points like you may have it's like the points that intersect the x-axis so it's all roots of the the polinomial s and they cannot be double roots but if something is a root of a polom and not a double root it means that it is not a a root of the derivative of the polinomial you see so so when I

substitute Omega here I I can I can be sure that 3 omega squ + x is non zero and substituting Omega is just substituting a p in in D ofu right so I I I conclude again that du at p is non zero Nicholas are you okay with this I think so okay and then final case in in the chat

ah yeah ER Lisa is this okay now or because you wrote it a while ago okay so the final case is a a p is equal to O if p is equal to O then the uniformer is X over Y and then what is D of u d of U is I have the the formula for derivation of a um of a quotient and if you do it you

get X Cub divided well not Cube you get um two I mean you get the derivative let's let's do it you get the derivative of x time y minus the derivative of y * X ided by Y 2 but the derivative of x is 2 y so I get 2 Y 2 minus the derivative of y is

um 3 x² + a but times x this is times a * X and here I do m 3 cub and here I put minus divided by by y s and uh ah okay and now I need to get rid of this H oh wait it's not a problem yeah so

evaluated at all I I don't want to do the calculation but we don't care this is finite this is um finite and non zero because the degrees are equal right the degree of the numerator is a I mean either you know y square has degree six and x x cube is is also degree six so here the degree is six and here the degree is also six so when you evaluate it all you you get some finite nonzero

number okay so this this concludes the proof ER let me give you an exercise um from the proposition

both so that if a rational function you satisfies U of p is equal to zero but du

U at p is not zero then U is a uniformize ATP okay this this will uh bring you back to the definition uh you will need to refresh the definition of uniformize and and so and also go back a little bit about the the properties of the derivation so I think it's it's like a nice

uh it's a nice thing to do and um the next thing that that we want to do is to to calculate the derivation of G GN this is going to be a 2N hn and the derivation of hent is going to be n * * 3 GN s +

a um yes ask a question er er what is the FN what do you mean by the FN ah no the D this is the function D um it's you I

mean we basically showed because if you think of it we I mean it's like a you can think of it as like a pulling a string I mean we know how to do D of X by but I mean we are forced by the axom axioms five and six we ER we are forced to to get the value of D of X and D of Y and then if we want axioms one up to four to be satisfied then there we must we have only one way to do D of x to the n and D of Y to the n and then

also D of x to the n y to the k um and then D of any polom and then by this property we get a d of any quotient of polinomial and any rational function is a quotient of pols so we we basically we had no choice it's like we um a I mean if you had another I mean why is it unique if you assume by um towards

contradiction that there was another function D Prime that satisfi axioms one up to six then D and D Prime would agree on X and they would agree on why right d of X need would need to be D of x d Prime of X and D of Y would need to be D Prime of Y and then D of xn would would have to be D Prime of xn okay and so on so all the things we did is like we had no choice it's a this is

this is this okay so what's coming up is H is this calculation and this will be next time I guess ER because it doesn't make sense to start it now ER but what what we will do I mean using the the derivation of GN and hn we will be able to um to pin down the the the zeros of of these functions the zeros of

this function are the the So-Cal in torsion points so so derivation this derivation will will come very handy in understanding torsion points of elliptic Earth all right ER let's request before before we take uh I mean we will meet again only on um only on the N9 9th of August ER so I will I will check the

Discord Channel if you uh yeah I'm sorry but I mean this I go to a conference but it's also good to do a summary appication um we are not far from we're not far from starting the whale pairing I imagine that we we need something like two sessions two or three sessions H to to finish the the end torsion points and then we we're more or less ready okay so nice yeah yeah I think

it's the it's going uh in in in good Pace H all right so have a have a good weekend and a good time off thanks by have tip by for