2012/08/02

RFC 6637 and construct elliptic curves

A new request for comments is available for elliptic curve cryptography. With the number 6637 the past June 11th was announced as official. Very good news for the elliptic curves and its cryptographic implementations. 


From the first version of this standard when it was a candidate has passed a few months more than 4 years. Yes, more than 4 years to public discussion. Necessary for consensus in standard development, but much more necessary for cryptography.


The old project of the patch for GnuPG, who was already obsolete a long a go, have some relation with the final code in the GnuPG. I'm glad when I see it in the sources that I have contributed somehow.


But what about the supported curves? The mentioned standard restricts the use of only a very few of them. The supported curves are only 3, one per each supported size: from the fips 186-3 the p-256p-384 and p-521 (the biggest 3 of the 5 in the Appendix D.1.2 "Curves over Prime Fields). They are known as the NIST curves and they are from the NSA suite b.


Yes, the standard doesn't close completely the use of other curves. There is a field in the structure of the key to specify the curve, but is not set directly the curve. What is place in the field is the curve OID. Even if the number of curves that can be listed using this Object Identifiers can be very big, it will never be as big as the existing and cryptographically valid elliptic curves. But there is hope in this issue, it wasn't like that the full time of this pre-standard process, there is a octet, the first one, who have a reserved value (0xFF) for future extensions.


Why can be so important to use as many curves as the users want? Easy, one of the biggest features in elliptic curves is the possibility to change the cyclic group where the discrete logarithm is protecting your secrets, without changing the size is because using a different curve with in the same base finite field the hardness of move an attack from the cyclic group in one curve to another cyclic group in another will be almost equivalent to start from scratch the attack over the new cyclic group on the new curve over the same finite field.


But, how can be a new curve generated? Recently in arxiv I've seen a article about this matter: "Method for constructing elliptic curves using complex multiplication and its optimizations" (July 30, 2012).


I've been working in isogenies using volcanoes and stars of them to speed up the initial way to construct a new curve (pointed in the abstract of the cited article):


  1. , where and
  2. If it doesn't satisfy the conditions restart from 1
But this article proposes the other way around, start finding an order that satisfy the conditions and then build a curve of this order. It's a promising idea to have a nice way to have as many curves as necessary. 


With the isogenies, I didn't found how to speed this up enough to have a new (cryptographically good) curve during the key generation (a reasonable time to not desperate the user). And even more, having the possibility to reset your key by change and old curve by a new one with out needing to create a new key, but assuring the security by a public and auditable procedure.

What is the utility of this feature of the cryptosystem reset? One that I can imagine, and can be compatible with the current standard is to have a corporative elliptic curve in the smart cards and periodically renew the curve. Knowing the path in the isogeny star, all the smart cards would be able to "migrate", but for a cryptoanalyser will be a very enormous hard work to "port" any running attack, even if the public keys are available in both curves, from the origin to the current if the path is still secret.

The most important thing in cryptology is the trust on mathematics. Giving the user 3 curves, that looks good, but only 3, is not enough. Like the S-boxes in DES, that wakes up susceptibilities, specially at the beginning, to know how they had been build (why those and not any other). Even more, giving a list of hundreds of thousands curves is neither enough because the problem is still the same.

The unique solution I see on that issue, is to give this public and auditable algorithm that allows the community to validate (or break) it that make the user confortable with the provided security.

Generalized Rijndael, a review

After a too long period of time with out working on this project I like to recover it.

I did a python implementation, that will be publish as free software (GPL) who is able to change the usual parameters of the Rijndael to work in a very different way than the 3 options of the standard. As a review:

Rijndael variable parameters:

  • Number of rounds
  • Number of rows
  • Number of columns
  • Wordsize (in bits)
  • Number of columns in the key
The 3 standard sizes are: {10,4,4,8,4}, {12,4,4,8,6}, {14,4,4,8,8} and this means:

  • Block size always 4x4 elements of 8 bits 128 bits
  • Key size can have 4, 6 or 8 columns 128,192,256 bits
    • And depending on this key size the number of rounds varies from 10, 12 or 14.
But this can be changed easily by something like: {40,2,2,8,8} and this means a Rijndael of 32 bits block with keys of 128 bits (doing 40 rounds, but this was set like this in the experiment because other small block ciphers have values like this).

But what means internally to the algorithm this change?

  • A new irreducible polynomial is need for the mixColumn() transformation, because the polynomial ring have the same number of coefficients than the number of rows.

Are there other options in Rijndael to get this combination? Yes: this would be equivalent to {40,4,4,2,16} and what does this mean?

  • A new Rijndael SBox must be build: the original is made to apply a substitution of works of 8 bits.
Pending demonstrations:
  • Is the generalized Rijndael still a Pseudo-Random Permutation (PRP)
  • How to build secure SBoxes?
  • How to get irreducible polynomials to be able to change the number of rows?
    • Is the invertible circulant matrix also valid for polynomial rings over , with ?
  • How to calculate the number of rounds necessary? Not less than need to be insecure, but not more to do superfluous calculations.

2012/07/13

When politicians creates a hole in the bottom of the bag

Yesterday, there where an announcement in the Spanish parliament about the biggest cuts ever seen in this country. And what was the reaction of our representatives? 50 seconds of applauses... Very very sad to see "my" representatives applauding the president because of the hardest blow  up to now.


Are we in a representative democracy? The current government have won election with promises that the firsts month start to be invalidated. Just after they won, the budget publication was delayed until regional elections.


Those politicians are not serious! There is not left and right anymore.


What about the recent announcement:
  • Increase the VAT from 18% to 21% (reduced VAT 8% to 10%), and probably move products from reduced to normal (this means from 8% to 21% in one step).
  • Reduce the salary of the public workers about the 7% (masked saying that is cutting the extra payment of Christmas). Usually the annual gross salary is divided in 14 payments, even if we call it extra, they are part of the salary.
  • Reduce the number of local representatives on villages, towns and cities.
  • Reduce the unemployment payment after 6 months without a job.
This last one is specially insulting. This president have said specifically, this is to motivate the people to find a job. Is this suggesting that the 25% of the Spanish workers doesn't have a jobs because they don't want it!

And from the ones who have a job, there is a field in the salary where is subtracted each month some money for an unemployment, insurance like, bag. And in case that I lost my job, I can get this and the number and time depends on how much I have placed there.

Well it work this way:
  1. You put some part of your salary in a bag. And the time you can have this insurance unemployment payment depends of how much you have placed in.
  2. There is a top of the bag. After you reach this top you contribute to the common. That means: you continue paying the insurance but you will not give anything more back.
  3. and now, in the middle of the game, some one decide that what you thought you had in the bag will be less in case you need.
Imagine you insurance decide unilaterally to reduce the covers but you are still forced to pay the bill with out an option to change.

But the problems are still there, and will not be fixed with this measures. Even more, this will made them worst:
  1. Unemployed will have less to circulate money, and not really contribute to find a job that doesn't exist.
  2. Employed will not circulate money because we don't know for how long we will have this job. Sooner or later, will we lose the job and confirm the theory?
But in this country the real problems are still there. The biggest problem of the tax fraud is not the question of the with or without VAT. Even if this is very big, the fraud is when the numbers are big enough. Maybe the global of this problem is big, but the big fraud made by not too many have very big numbers. Why we have a tax amnesty?

Some of my doubts:
  • Where is this country going?
  • What can we have by pacific protest in the squares? (15M like)
  • Are the politicians, and the ones who move the threads from the shadow, aware about the increase of the hate to them by the respectable citizens?
  • Are they aware that punishing the pacific protest like terrorism or authority resistance, is the way to justify violent protests? (price by price...)
Next Saturday: "(...) faced a major economic crisis (...) and exacerbated by a regressive system of taxation (...)"




2012/06/26

When solutions are the answer to different problems

With in this Spanish crisis, many problems have been identified. The main issue are the possible solutions. Every day in the news the citizens are informed about new creative solutions to that problems. The issue of those solutions is that too often they are solutions for other problems or only partial solutions for the announced problem.


Last one is the Spanish health care system. From the last years many times have mentioned that the level of the retirement system is too high, unsustainable. The country can not support that level and the age of retirement was extended and the conditions worsen. It looks like only the public retirement systems was affected and nothing mention about private retirement plans.


Following the same path, the medicine prescriptions from the public health care are now, again, in the target point. Again the terms and conditions "changes during the game" with only one side agreement.


Ok, in Catalunya the citizens will pay extra fee for a prescripted medicine, and also the pensioners who had their medicines for free will have to pay for them. Also Spanish government have its own plan to increase the fee in medicines according to the incomings. Abstractly it looks good, it looks to have solidarity principle. But not in this country.


But what about the very old issue of the containers of the medicines? Long a go have said and now forget, that the containers of the medicines wasn't adapted to the treatments. Very loud have said that this mismatch costs a lot of money to the public resources. Even that the solution is to increase the part that the citizens pay directly by the use instead of fix the problem of the sizing of the medicine boxes.


Well done. This problem is not fix because the implemented solution doesn't fix completely the problem and it's only a temporally patch. Typical Spanish.


Furthermore, because this new fee depending on the incomings request to cross data from treasure department and the health care department a new fraud comes to the surface: an enormous fraud using sanitary cards. That's not new, it was already from long a go in the list of usual frauds in health care. Well they simply quantify it.


But all the citizens will suffer the consequences of this fraud? Isn't this solution worst for the ones who did it correctly? And again, this is a partial patch, it doesn't fix the problem.


A few day a go, another economical announcement from the government: "The with VAT or without it, must finish". The government will fight the black economy when a few weeks a go they promote a tax amnesty.


Day by day we see this, once again and again. Big adds with very big solutions, and after a few days they are forget or implemented in a way that didn't fix the initial problem.


We rescue the banking when the government is not acting to get save the citizens. The system of the mortgages it's dark. In capitalism there are wins and losts of the bets. We know the banks have carried a risk giving loans, but now we can see that in practice they only win.


When the things goes wrong they receive public money to refloat. Public money that created public debt. Due to that the citizens saw how the rules changes during the game (retirement, taxes,...) but the banks law cannot change to avoid a perverse system where the bank move you out of your home, you loose it, and you still have a debt with this bank (who can be bigger that the initial) and if need the bank is rescued.

2012/06/19

On the passing years

"Too much times have rained" from the first stone in half 2006 to today. We have worked hard to see this machine up and running. An incredible amount of effort, some one count it, some one forget it.


Even if the politicians have inaugurate this facility in 2008, it's now when this resource can be used. If I remember correctly, when this has been inaugurated we have been doing the booster commissioning, the installation of the storage ring wasn't completed and don't imagine who the beamlines was.


But today, we have started receiving the first friendly users. In this case, a very similar thing happen. In the news is indistinguishable if they are friendly users (that means we are in the last part of the commissioning) or if they are the users that have applied to the user office call for proposals.


But we have a synchrotron!




Uou! There is a detail on this picture. We have the letters of the synchrotron name painted in the roof of the warehouse. This warehouse is a building in side the are of the synchrotron but the machine and the beamlines are in the circular building in the centre of the image.


Can we see this letters closer?




What the hell! This letters are uncoloured, but they has been painted in 2010 (just when the salaries of the workers has been cutted) and repainted in February 2011.


Why do we have 4 big letters in the roof of a secondary building of this facility?


Can this be only to distinguish the building in google maps?


In a country like españistan everything it is possible. Cut salaries, when paint superfluous letters in a roof.

2012/05/29

Spain a tax haven

Can somebody explain me the difference between a tax amnesty and a tax haven?

2012/04/13

Spanish brain exodus

Spanish economy is not living the bests moments, we have to complain with austerity, understanding the necessary cuts as a need to save to country... Who the hell believes that? Specially when someones are not affected by this cuts: the ones who "decide" this cuts, and the ones who order this deciders to do this cuts.


One of the results of this cuts has been mention in science. In the synchrotron we are not special. Not for the good, neither for the bad. We are only another more in the same case. We only are another example of what's happening.


From the lasts years, many of the workers in this facility left the project to find better work conditions in terms of salaries, conciliation of family live and work, better perspectives in jobs and qualifications. When the perspective is the sadness of your career and the only way to improve is to scape of the country, the result is very bad. Alba is becoming a training camp for other institutes. A non negligible percentage of the workers left the project to go work in other big facilities, when this had not been finished yet, with the consequent lost of knowledge.


Before Easter an important part of the workers of the synchrotron have lived what the last workers statute law modification (badly named labour marker law, a worker is not a product or this "market" word is insulting us). The accelerators group have had unilaterally modified their work conditions. Yes, the management agreed to negotiate this modification with the workers representatives, but it wasn't so real. Also due to that, many internal tensions has been generated and increase the sadness of the workers. And this was for free, because from 2011 the workers representatives were asking to talk about the shifts regulations, the on-call service, and who experiments can cover their support service to the users. Only one of this three aspects have been "fixed" with this "substantial work conditions modification".


But, we don't have real management! We have an acting director and another two open positions in key places: accelerators and experiments division heads! Only service divisions are still having the same head (administration, engineering, and computing). The time have given us more calm and quiet corridors and meetings with the new acting director, but the real issues didn't change so much.


Back to the Spanish situation, with cuts in the very basic columns of a society: I say education and health. Followed by cuts every where else where the 90% of the citizens are with the silly support of 9% of the richness thinking that they can become on the 1% of the sickening richness. But without doing anything to the ones of themselves who steal and embezzle the "poor" resources of this country.


90% of the people have to suffer to maintain the level where the 10% is accustomed. I understand that everyone who can, at any small opportunity, left this country.