I have finished school, now the next step is the masters in science, I live in a new home with my love, my new home is beautiful, i have more space and more stuff to share, I'm happy :)
Other things are that I'm implementing AES-128 over IBM SPEs using a PS3, studying coordinate rings and function fields of genus 2 curves.
The purpose is to get a new perspective in asymmetric cryptography with the discrete logarithm problem.
I'll be writing here some math soon
Wednesday, September 01, 2010
Thursday, February 11, 2010
Álgebra de votaciones para procesos electorales
Últimamente se ha hecho una modita el rechazar elecciones electrónicas por razones las cuales siento que carecen de fundamentos.
Hice una presentación la cual no fue del todo aprovechada ya que donde lo iba a exponer no sirvió el proyector, pero tambien expongo un punto de vista distinto al usual para realizar votaciones electrónicas (con criptografía y no con solo contadores electrónicos y cables), como valor agregado obviamente salvarás millones de árboles.
En el documento no toco temas socio-políticos los cuales son los que causan polémica, sino tres algoritmos necesarios para
poder realizar un proceso electoral electrónico.
Este documento puede ser un poco complicado, así que a manera de resumen explico los tres algoritmos:
1.Zero-Knowledge: Este algoritmo permitirá a una persona A poderle demostrar a B que A conoce un secreto "s" y B quedará totalmente convencido de que "s" existe pero sin que A haya revelado s, solamente a B se le revelara la veracidad de la existencia de "s". (Se utiliza el problema de logaritmo discreto), un poco mas técnico, el algoritmo podrá mostrarle a B que A posee una llave que abre un mensaje sin que el mensaje sea revelado ni la llave.
Un ejemplo que luego ocupo para explicar es: "¿Cómo puedo convencerte de que realmente si tengo la receta de la coca-cola para que me la pagues primero y luego te la de?"
2. Shamir threshold: Este algoritmo permitirá que N personas tengan un "pedazo" de secreto "s" y que si k personas (k menor que s) se juntan puedan reconstruir el secreto "s" de tal manera que los pedazos de secreto nunca podrán construirse a partir k-1 personas.
Por ejemplo, imaginen que una bóveda es de 10 personas, pero por alguna extraña razón quieren que si se juntan cualesquiera 3 personas de esos 10 puedan abrirla. La bóveda tiene un password y este solo se puede construir cuando se juntan 3 personas y no menos. (Este algoritmo utiliza polinomios de Lagrange)
3. Diffie-Hellman
¿Cómo podemos negociar una llave secreta dos personas aunque haya un tercero oyendo TODA nuestra negociación?
Esto utiliza logaritmo discreto.
Y por ultimo utilizando Elgamal se simula un esquema de votación de en el conjunto {-1,1} (si o no) , esto es suficiente ya que si hay mas candidatos es como hacer (a,b) o c es ( (a,b), c) (suma directa) .
Como les digo, aquí no discuto la honradez o la educación de la banda para poder votar, sino que hipotéticamente es posible y es seguro.
Con este esquema los votantes podrían hacer lo siguiente:
1. Checar que su voto realmente fue contado
2. Checar que su voto fue contado por quién ellos eligieron
3. Sufragio total, solo el votante puede verificar el punto 2 (todo esto protegido con criptografía asimétrica y certificados)
4. Los votantes pueden contar los votos y quedar convencidos de que el conteo no fué truqueado
A diferencia de los esquemas habituales (Brasil , Australia, Estados Unidos) , con criptografía se pueden asegurar cosas.
y no solamente incrementar un contador como lo ha sido en esos paises. Con criptografía se puede hacer que realmente el voto sea secreto, efectivo y robusto ante tramposos.
Les dejo la liga: aquí
Saludos Eduardo Ruiz Duarte (beck)
Hice una presentación la cual no fue del todo aprovechada ya que donde lo iba a exponer no sirvió el proyector, pero tambien expongo un punto de vista distinto al usual para realizar votaciones electrónicas (con criptografía y no con solo contadores electrónicos y cables), como valor agregado obviamente salvarás millones de árboles.
En el documento no toco temas socio-políticos los cuales son los que causan polémica, sino tres algoritmos necesarios para
poder realizar un proceso electoral electrónico.
Este documento puede ser un poco complicado, así que a manera de resumen explico los tres algoritmos:
1.Zero-Knowledge: Este algoritmo permitirá a una persona A poderle demostrar a B que A conoce un secreto "s" y B quedará totalmente convencido de que "s" existe pero sin que A haya revelado s, solamente a B se le revelara la veracidad de la existencia de "s". (Se utiliza el problema de logaritmo discreto), un poco mas técnico, el algoritmo podrá mostrarle a B que A posee una llave que abre un mensaje sin que el mensaje sea revelado ni la llave.
Un ejemplo que luego ocupo para explicar es: "¿Cómo puedo convencerte de que realmente si tengo la receta de la coca-cola para que me la pagues primero y luego te la de?"
2. Shamir threshold: Este algoritmo permitirá que N personas tengan un "pedazo" de secreto "s" y que si k personas (k menor que s) se juntan puedan reconstruir el secreto "s" de tal manera que los pedazos de secreto nunca podrán construirse a partir k-1 personas.
Por ejemplo, imaginen que una bóveda es de 10 personas, pero por alguna extraña razón quieren que si se juntan cualesquiera 3 personas de esos 10 puedan abrirla. La bóveda tiene un password y este solo se puede construir cuando se juntan 3 personas y no menos. (Este algoritmo utiliza polinomios de Lagrange)
3. Diffie-Hellman
¿Cómo podemos negociar una llave secreta dos personas aunque haya un tercero oyendo TODA nuestra negociación?
Esto utiliza logaritmo discreto.
Y por ultimo utilizando Elgamal se simula un esquema de votación de en el conjunto {-1,1} (si o no) , esto es suficiente ya que si hay mas candidatos es como hacer (a,b) o c es ( (a,b), c) (suma directa) .
Como les digo, aquí no discuto la honradez o la educación de la banda para poder votar, sino que hipotéticamente es posible y es seguro.
Con este esquema los votantes podrían hacer lo siguiente:
1. Checar que su voto realmente fue contado
2. Checar que su voto fue contado por quién ellos eligieron
3. Sufragio total, solo el votante puede verificar el punto 2 (todo esto protegido con criptografía asimétrica y certificados)
4. Los votantes pueden contar los votos y quedar convencidos de que el conteo no fué truqueado
A diferencia de los esquemas habituales (Brasil , Australia, Estados Unidos) , con criptografía se pueden asegurar cosas.
y no solamente incrementar un contador como lo ha sido en esos paises. Con criptografía se puede hacer que realmente el voto sea secreto, efectivo y robusto ante tramposos.
Les dejo la liga: aquí
Saludos Eduardo Ruiz Duarte (beck)
Etiquetas:
algebra,
cifrado,
criptografia,
elecciones,
matematicas
Wednesday, October 28, 2009
Coloquio nacional de criptografía y códigos
Hoy tuve la oportunidad de impartir una plática titulada "Introducción a las curvas elípticas, hiperelípticas y libcurve"
Estuvo muy rápida ya que solo me dieron 20 minutos y son 30 slides, pero al parecer la gente tenía idea del asunto y eso lo pudo hacer mas dinámico.
La charla trata de como generalizar el problema de logaritmo discreto sobre curvas algebraicas, en este caso las hiperelípticas usando teoría de divisores el cual es un tema un poco complejo desde el punto de vista de la criptografía usual, este problema de logaritmo discreto es la base de muchos de los algoritmos para transacciones seguras, (Elgamal, Diffie-Hellman, etc..)
El punto era introducir a la investigación de grupos abelianos distintos al usual multiplicativo en criptografía asimétrica, visto desde el punto de vista geométrico intuitivo y desde el punto de vista geómetra algebraico, hasta llegar a la estructura del grupo de Picard de orden cero isomorfo a la jacobiana de la curva, espero opiniones.
Aqui dejo las slides
Saludos
Estuvo muy rápida ya que solo me dieron 20 minutos y son 30 slides, pero al parecer la gente tenía idea del asunto y eso lo pudo hacer mas dinámico.
La charla trata de como generalizar el problema de logaritmo discreto sobre curvas algebraicas, en este caso las hiperelípticas usando teoría de divisores el cual es un tema un poco complejo desde el punto de vista de la criptografía usual, este problema de logaritmo discreto es la base de muchos de los algoritmos para transacciones seguras, (Elgamal, Diffie-Hellman, etc..)
El punto era introducir a la investigación de grupos abelianos distintos al usual multiplicativo en criptografía asimétrica, visto desde el punto de vista geométrico intuitivo y desde el punto de vista geómetra algebraico, hasta llegar a la estructura del grupo de Picard de orden cero isomorfo a la jacobiana de la curva, espero opiniones.
Aqui dejo las slides
Saludos
Thursday, June 04, 2009
¡YO no votaré! y lo digo con orgullo, ¿por qué?
¿Por quién votar?
Este país realmente tiene un modelo aristocrático (gobierno de "los mejores")
Los círculos políticos son muy acotados y exclusivos, realmente todos sabemos que todos los candidatos son impuestos a través de una red basada en favores para satisfacer intereses particulares.
Se pagan impuestos para mantener organizaciones que NO HACEN BIEN SU TRABAJO... ya que como menciono, el gobierno funciona a base de favores , ejemplos de "¿quién manda?"
-Comision federal de competencia o Carlos Slim
-PEMEX o Romero Deschamps con su reloj de 200 mil dólares (no exagero)
-SEP o Elba Esther Gordillo
etc...
El país no funciona, y los partidos que dicen ser de izquierda-centro o izquierda están compuestos por gente de legalidad discutible también.
Las respuestas a la pregunta del ¿por quién votar? son muy vacías pero es que no hay otra manera de discriminar a los candidatos ya que, por buenos gobernantes, legisladores, representantes
pues ninguno , todos tienen cola que les pisen, en especial los partidos chicos que no por ser chicos significa que son la clave... ya que generálmente están rellenos de gente del tipo Campa, Dante Delgado, Bejarano, etc...
Asi que tus únicas opciones son:
-Vota por el mas guapo/a
-Vota por el que tenga publicidad mas atractiva
-Vota por el que represente en caso de ser militante (1% del padron)
-Vota por el que te conmueva mas con sus comerciales fatalistas
-NO VOTES.
Perdón, pero no hay una manera linda de decirlo...
1. Todos los comerciales son porquería y esos millones que se gastan en publicidad realmente deberian de ocuparlo para ayudar a la gente, ellos están jugando con el psique de la gente la cual basa su cultura en la televisión y tiene criterio bajo, lo cual desafortunadamente abunda en Mexico,
ya que ningun programa de TV de alto rating tiene cosas inteligentes, reales o al menos NO HUMILLANTES que decir... y en el inter los comerciales son del tipo.. Lo cual causa una anomía
aún mas grande, la televisión tiene la culpa de MUCHO de lo que está sucediendo, ya que es uno de los principales medios culturales para los ciudadanos.
2. La impunidad a esos niveles es algo usual, porque votar por porquería, una vez mas, Bejarano, Niño verde, etc..
3. La sed de dinero hace que los partidos tengan una necesidad absurda de ganar generando miles de propuestas virtuales por TV y radio que al fin no serán aplicadas porque la cámara legislativa esta compuesta por PARTIDOS POLITICOS, no por LEGISLADORES que al fin y al cabo todos quieren satisfacer sus intereses partidistas, no es prejuicio, ya que así ha sido por décadas.
4. Que es eso de "Pena de muerte" , acaso quieren convertirse en gringos imperialistas donde el miedo sea el principal medio de control publico? no somos animales, porfavor.
5. La mayoria de las comunidades intelectuales concuerda con que no hay que votar...
no podemos ser una bola de borregos...
6. Millones de pesos se les dan a los partidos políticos para subsistir...
millones de plasticos, playeras , relojes, y propaganda que expira en 3 meses de campaña
¿cómo pueden dotar de tanto dinero a estar organizaciones para estos fines? por eso es un gran negocio
Yo no votaré, porque no creo en el sistema, y aunque algunos me dicen "Ve a anular tu voto" creo que como todo funciona al revés en esta anti-democrática sociedad,
no me tiene interesado el hecho de que el padrón ocupe mi voto...
Porque aun votando , los números son falsos, y aparte no tengo porque votar en un sistema que CLARAMENTE no funciona.
Y aunque voten 28 de 45 millones y esos 28 decidan el rumbo del pais...
SI HARIA LA DIFERENCIA el hecho de que el mundo se entere que en Mexico la democracia está muriendo por la corrupción y se puede obtener una revolución pacífica para cambiar el modo de orden social que se ha establecido.
Si me preguntan ¿cual es ese orden?, aun no se me ocurre, y probablemente no se me ocurrirá
o tal vez inseguramente podría decir una república unipartidista parlamentaria... pero bueno , eso se me acaba de ocurrir en este segundo... pero debe de ser algo donde los legisladores no puedan joder, incluso "no les convenga" desviar fondos para otra cosa que no sea Mexico...
o sea, evitaremos idioteces como Pemexgate, entre otras...
En resumen.
Yo promuevo el NO VOTO.
Votar por alguien que no conoces es votar por la ignorancia.
Eduardo Ruiz Duarte
Este país realmente tiene un modelo aristocrático (gobierno de "los mejores")
Los círculos políticos son muy acotados y exclusivos, realmente todos sabemos que todos los candidatos son impuestos a través de una red basada en favores para satisfacer intereses particulares.
Se pagan impuestos para mantener organizaciones que NO HACEN BIEN SU TRABAJO... ya que como menciono, el gobierno funciona a base de favores , ejemplos de "¿quién manda?"
-Comision federal de competencia o Carlos Slim
-PEMEX o Romero Deschamps con su reloj de 200 mil dólares (no exagero)
-SEP o Elba Esther Gordillo
etc...
El país no funciona, y los partidos que dicen ser de izquierda-centro o izquierda están compuestos por gente de legalidad discutible también.
Las respuestas a la pregunta del ¿por quién votar? son muy vacías pero es que no hay otra manera de discriminar a los candidatos ya que, por buenos gobernantes, legisladores, representantes
pues ninguno , todos tienen cola que les pisen, en especial los partidos chicos que no por ser chicos significa que son la clave... ya que generálmente están rellenos de gente del tipo Campa, Dante Delgado, Bejarano, etc...
Asi que tus únicas opciones son:
-Vota por el mas guapo/a
-Vota por el que tenga publicidad mas atractiva
-Vota por el que represente en caso de ser militante (1% del padron)
-Vota por el que te conmueva mas con sus comerciales fatalistas
-NO VOTES.
Perdón, pero no hay una manera linda de decirlo...
1. Todos los comerciales son porquería y esos millones que se gastan en publicidad realmente deberian de ocuparlo para ayudar a la gente, ellos están jugando con el psique de la gente la cual basa su cultura en la televisión y tiene criterio bajo, lo cual desafortunadamente abunda en Mexico,
ya que ningun programa de TV de alto rating tiene cosas inteligentes, reales o al menos NO HUMILLANTES que decir... y en el inter los comerciales son del tipo.. Lo cual causa una anomía
aún mas grande, la televisión tiene la culpa de MUCHO de lo que está sucediendo, ya que es uno de los principales medios culturales para los ciudadanos.
2. La impunidad a esos niveles es algo usual, porque votar por porquería, una vez mas, Bejarano, Niño verde, etc..
3. La sed de dinero hace que los partidos tengan una necesidad absurda de ganar generando miles de propuestas virtuales por TV y radio que al fin no serán aplicadas porque la cámara legislativa esta compuesta por PARTIDOS POLITICOS, no por LEGISLADORES que al fin y al cabo todos quieren satisfacer sus intereses partidistas, no es prejuicio, ya que así ha sido por décadas.
4. Que es eso de "Pena de muerte" , acaso quieren convertirse en gringos imperialistas donde el miedo sea el principal medio de control publico? no somos animales, porfavor.
5. La mayoria de las comunidades intelectuales concuerda con que no hay que votar...
no podemos ser una bola de borregos...
6. Millones de pesos se les dan a los partidos políticos para subsistir...
millones de plasticos, playeras , relojes, y propaganda que expira en 3 meses de campaña
¿cómo pueden dotar de tanto dinero a estar organizaciones para estos fines? por eso es un gran negocio
Yo no votaré, porque no creo en el sistema, y aunque algunos me dicen "Ve a anular tu voto" creo que como todo funciona al revés en esta anti-democrática sociedad,
no me tiene interesado el hecho de que el padrón ocupe mi voto...
Porque aun votando , los números son falsos, y aparte no tengo porque votar en un sistema que CLARAMENTE no funciona.
Y aunque voten 28 de 45 millones y esos 28 decidan el rumbo del pais...
SI HARIA LA DIFERENCIA el hecho de que el mundo se entere que en Mexico la democracia está muriendo por la corrupción y se puede obtener una revolución pacífica para cambiar el modo de orden social que se ha establecido.
Si me preguntan ¿cual es ese orden?, aun no se me ocurre, y probablemente no se me ocurrirá
o tal vez inseguramente podría decir una república unipartidista parlamentaria... pero bueno , eso se me acaba de ocurrir en este segundo... pero debe de ser algo donde los legisladores no puedan joder, incluso "no les convenga" desviar fondos para otra cosa que no sea Mexico...
o sea, evitaremos idioteces como Pemexgate, entre otras...
En resumen.
Yo promuevo el NO VOTO.
Votar por alguien que no conoces es votar por la ignorancia.
Eduardo Ruiz Duarte
Tuesday, February 10, 2009
Does God exist...?
Recently I am in a new advanced Logic class in my last semesters...
I'm enjoying my classes and I'm studying some mathematical objects that can help to deal
with philosophy.
Kurt Gödel proved that god exists using Modal Logic in 1941
Gödel made a lot of advances in logic after Russell found the big hole in set theory with the existance of "non-sets" (classes) coming from a propositional formulae particulary with R = { x / x is not in x }
haha and today the professor assistant of Set theory made a very very nice explanation of this paradox to the people that doesnt understand it... I can write it whenever you want with an example, just comment...
Gödel made a lot of advances in Analytic philosophy and the study of the formalization of the reason and the mathematical logic when showing truths,
How can someone prove that something exists if you dont know what is that 'something'?
well, there are a lot of abstract algebraic logic structures to deal with the models of everything, I love algebra and.. with logic.. is awesome, there are other logic systems different than the usual (because nobody can tell us what is really a truth, we can assume different systems of logic, I know you have heard this in sometime when drunk with your friends)
Of course the God that Gödel made exists assuming the Axioms proposed
and the model of god made using abstract algebraic logic, so now we are closer to the truth, (I'm not saying that Jesus exists, or Buddha or wtf you adore)
I'm saying that the suprema was modeled maybe with lattices or other algebraic structures to show that a set has some special order... and a set of axioms that are consistent and not self contradictory over a logic system...
So , maybe it exists and he doesnt care of anything, or is bad , or is a concept in a logic that cannot be understanded by most of the people.
Modal logic is a formal logic system that deals with "Necessity of truths" and "Possibility of truths", proving the existanse of god using that a truth is necessary if its negation entails a contradiction.
so, something that we can be for sure is that the model of god proposed by
Gödel exists.
Logic is a very very damn interesting area I'm starting to love it, in my other courses it was just concepts and first order logic , but now I can use more objects like lattices, logical ideals, filters , ultrafilters, suprema, orders, etc.. to help understanding and formalising the philosophy, not just 'thinking absurd'.
I'm studying this now, If you want a more technical explanation just comment, maybe i can do something.
beck [ a T]math [d oT] co[ dO T] ro
Eduardo Ruiz Duarte
I'm enjoying my classes and I'm studying some mathematical objects that can help to deal
with philosophy.
Kurt Gödel proved that god exists using Modal Logic in 1941
Gödel made a lot of advances in logic after Russell found the big hole in set theory with the existance of "non-sets" (classes) coming from a propositional formulae particulary with R = { x / x is not in x }
haha and today the professor assistant of Set theory made a very very nice explanation of this paradox to the people that doesnt understand it... I can write it whenever you want with an example, just comment...
Gödel made a lot of advances in Analytic philosophy and the study of the formalization of the reason and the mathematical logic when showing truths,
How can someone prove that something exists if you dont know what is that 'something'?
well, there are a lot of abstract algebraic logic structures to deal with the models of everything, I love algebra and.. with logic.. is awesome, there are other logic systems different than the usual (because nobody can tell us what is really a truth, we can assume different systems of logic, I know you have heard this in sometime when drunk with your friends)
Of course the God that Gödel made exists assuming the Axioms proposed
and the model of god made using abstract algebraic logic, so now we are closer to the truth, (I'm not saying that Jesus exists, or Buddha or wtf you adore)
I'm saying that the suprema was modeled maybe with lattices or other algebraic structures to show that a set has some special order... and a set of axioms that are consistent and not self contradictory over a logic system...
So , maybe it exists and he doesnt care of anything, or is bad , or is a concept in a logic that cannot be understanded by most of the people.
Modal logic is a formal logic system that deals with "Necessity of truths" and "Possibility of truths", proving the existanse of god using that a truth is necessary if its negation entails a contradiction.
so, something that we can be for sure is that the model of god proposed by
Gödel exists.
Logic is a very very damn interesting area I'm starting to love it, in my other courses it was just concepts and first order logic , but now I can use more objects like lattices, logical ideals, filters , ultrafilters, suprema, orders, etc.. to help understanding and formalising the philosophy, not just 'thinking absurd'.
I'm studying this now, If you want a more technical explanation just comment, maybe i can do something.
beck [ a T]math [d oT] co[ dO T] ro
Eduardo Ruiz Duarte
Tuesday, January 13, 2009
Torres radicales de Galois
Ultimamente he estado codeandome mucho con la crema y nata de matematicos en irc, y hablando con un amigo catalan con el que comparto ciertos intereses, y ciertos apuntes de clase que nos mandamos , Esto es buenisimo, sobre algo que yo crei que no tenia mucho interes por la ignorancia de no comprenderlo a fondo.
Por fin entiendo la estructura algebraica que me permite descubrir si un polinomio es soluble por radicales,
porque un error que todo el mundo tiene es creer que 'no existe ecuacion quintica' , pero vaya , el teorema fundamental
asegura que 'no todos' tienen solucion por radicales , por ejemplo px^n = q la ecuacion general que soluciona eso es
Raiz_enesima(q/p) la cual CLARAMENTE es soluble por radicales, he aqui una explicacion de estas estructuras algebraicas tan chingonas.
Para entender eso solo hay que tener claro lo que son extensiones de campo.
Saludos
Eduardo Ruiz Duarte
beck


Por fin entiendo la estructura algebraica que me permite descubrir si un polinomio es soluble por radicales,
porque un error que todo el mundo tiene es creer que 'no existe ecuacion quintica' , pero vaya , el teorema fundamental
asegura que 'no todos' tienen solucion por radicales , por ejemplo px^n = q la ecuacion general que soluciona eso es
Raiz_enesima(q/p) la cual CLARAMENTE es soluble por radicales, he aqui una explicacion de estas estructuras algebraicas tan chingonas.
Para entender eso solo hay que tener claro lo que son extensiones de campo.
Saludos
Eduardo Ruiz Duarte
beck
Friday, January 02, 2009
Inicio 2009
2008 was a year full of work and a lot of school , I'm advancing in school, slow , but keep going , i had a good semester... and a lot of work, I was at USA last week , with my family, I'm still working in my cryptography maths for my library, I have some advances in galois theory implementation, i hope someday ill release , but as i said if someone is interested in my advances mail me and ill send the current working code.
A friend tenex asked me for help in linked list stuff , I had a spare time and i made something
If you dont know nothing about linked lists you can check this code , is commented and it has a shell for working on the memory in real time.
/source here
Greetz to all and happy new year :)
Eduardo Ruiz Duarte
A friend tenex asked me for help in linked list stuff , I had a spare time and i made something
If you dont know nothing about linked lists you can check this code , is commented and it has a shell for working on the memory in real time.
/source here
Greetz to all and happy new year :)
Eduardo Ruiz Duarte
Wednesday, November 19, 2008
Regreso de Taiwan/China
Estuve en Asia , fui a una competencia y gane, pero bueno...
estuvo bueno y me diverti, aprovechando la vuelta fui a Xian, Beijing y Shanghai
en mi facebook hay algunas pics , regresando al geekismo combinado con responsabilidades academicas , ando en chinga con las materias de la escuela
en especial con Algebra geometrica, y ya termine el port de 32/64 bits en unix
de libcurve , despues de leer mil cosas de automake.
Espero terminarlo en estas vacaciones y publicarlo ya con aritmetica de campos finitos de caracteristica 2.
si alguien quiere el codigo beta , mandeme correo y le doy la URL
trae un demo que implementa diffie hellman y elgamal, estuve en ENLI puebla di la platica de criptografia asimetrica con curvas elipticas , hubo quorum por lo menos , y la gente estuvo atento e hizo un par de preguntas buenas.
otro dato fue que cumpli 24 anios el 3 de noviembre, ya tengo que apurarme...
Saludos
estuvo bueno y me diverti, aprovechando la vuelta fui a Xian, Beijing y Shanghai
en mi facebook hay algunas pics , regresando al geekismo combinado con responsabilidades academicas , ando en chinga con las materias de la escuela
en especial con Algebra geometrica, y ya termine el port de 32/64 bits en unix
de libcurve , despues de leer mil cosas de automake.
Espero terminarlo en estas vacaciones y publicarlo ya con aritmetica de campos finitos de caracteristica 2.
si alguien quiere el codigo beta , mandeme correo y le doy la URL
trae un demo que implementa diffie hellman y elgamal, estuve en ENLI puebla di la platica de criptografia asimetrica con curvas elipticas , hubo quorum por lo menos , y la gente estuvo atento e hizo un par de preguntas buenas.
otro dato fue que cumpli 24 anios el 3 de noviembre, ya tengo que apurarme...
Saludos
Sunday, June 01, 2008
regreso de Colombia
Ya estoy en Mexico.
Fue una gran experiencia en el XXXVIII foro de la OEA , hubo grandes celebridades politicas
como el presidente de Colombia, secretario de la OEA, etc..
Conoci gente inteligente, como Zazil Ortiz, mexicana de Nayarit quien desafortunadamente no gano en la competencia, porque? pues tal vez era por una mala participacion cientifica en el evento dandole poca importancia a el impacto.
M.C. Zazil Ortiz hasta donde le entendi encontro una manera mas eficiente que todo lo que existe para poder producir bromelina encontrando sustancias que inducen proteinas en Pinias.
la bromelina hasta donde le entendi tambien.. es una enzima que hace que asimiles mejor los aminoacidos, y bueno tiene otras aplicaciones como para cancer.
o sea sirve para complementarse con otras sustancias para servir... digamos que es el equivalente al 'numero primo' de un compuesto para generar farmacos.
Esto es un descubrimiento Mexicano... gente veanlo. Yo gane y al parecer saldre en la prensa de la unam y en otros periodicos, no dudare en mencionar este tipo de cosas porque creo que fue uno de los mejores proyectos en toda la competencia y no fue valorado como debe de ser.
Saludos a todos
Fue una gran experiencia en el XXXVIII foro de la OEA , hubo grandes celebridades politicas
como el presidente de Colombia, secretario de la OEA, etc..
Conoci gente inteligente, como Zazil Ortiz, mexicana de Nayarit quien desafortunadamente no gano en la competencia, porque? pues tal vez era por una mala participacion cientifica en el evento dandole poca importancia a el impacto.
M.C. Zazil Ortiz hasta donde le entendi encontro una manera mas eficiente que todo lo que existe para poder producir bromelina encontrando sustancias que inducen proteinas en Pinias.
la bromelina hasta donde le entendi tambien.. es una enzima que hace que asimiles mejor los aminoacidos, y bueno tiene otras aplicaciones como para cancer.
o sea sirve para complementarse con otras sustancias para servir... digamos que es el equivalente al 'numero primo' de un compuesto para generar farmacos.
Esto es un descubrimiento Mexicano... gente veanlo. Yo gane y al parecer saldre en la prensa de la unam y en otros periodicos, no dudare en mencionar este tipo de cosas porque creo que fue uno de los mejores proyectos en toda la competencia y no fue valorado como debe de ser.
Saludos a todos
Monday, May 05, 2008
Magic-ssl and Change of basis matrix with its inverse made easy and O(1)
I have not posted long time ago, I've been busy with school and work, my life has had a big change, but well anything is fine, except that i need more time to dedicate to the things i like to do , but well...
here is something new... , I've been working in my elliptic curve library in my spare time , and is almost finished , It will be ready this summer, other little programs I made that may be interesting to you is a "magic-ssl" library with SSL state-save connection , just in the case you want to do a 'normal' client-tcp-ssl connection in C
here are the prototypes I explain it here because people says i do not document my stuff , and in fact is not documented so , read this if you are interested.
Magic-ssl library
If someone really like this little library write me and if just one asks ill put a formal documentation.
To compile , use the functions as ill explain here and then
gcc magic.c -I . -lssl main.c
where main.c is your file , or make a dynamic library
gcc magic.c -I . -lssl -fPIC -shared -o libmagic-ssl.so
It is important to put libmagic-ssl.so and not libmagic.so because
there's a libmagic.so in almost all unixes.
Magic ssl API
/*
* This is my main opaque type , its used in all my functions , you dont need to know it
* because all is filled in the internals but well i present you this
*/
typedef struct remote {
int fd; /* remote fd */
int ssl; /* has ssl ? */
struct sockaddr_in addr; /* remote address info */
SSL *active; /* this pointer tells if is active or not */
SSL_CTX *ctx; /* context of the ssl negotiation */
} remote_t;
/* this is the first function you will need to call to a remote_t
* to allocate all the stuff we need
*/
void *magic_alloc(void);
/* This is the second function you will need to call
* arg1 = hostname or IP of the remote host
* arg2 = port number (it must be short but well , i put int)
* arg3 = SSL_ON or SSL_OFF (if you want to do a SSL handshake or just a normal socket
* arg4 = pointer to the remote_t we malloced before
*/
int magic_tcpconnect(const char *,int,int,remote_t *);
/* Third function is for writing to socket
* the syntax is like write(2) , the difference is that
* arg1 = remote_t descriptor we created at the begining
* arg2 = pointer to bufdata we are going to write in socket
* arg3 = size of data to write
*/
int magic_write (remote_t *, void *, int)
/* Fourth function is the dual of the above
* and is the same logic
*/
int magic_read (remote_t *, void *, int);
/* Fifth function closes connection
* arg1=pointer to remote_t we used to create our context
*/
void magic_close (remote_t *);
/* Sixth function free's the malloced area we created at the beginning
* arg1=pointer to remote_t we used to create our context
*/
void magic_free(remote_t *);
/* other functions that are 'internal use' that you do not need to know about its existence */
/* creates a socket , first 3 args are same as socket(2)
* arg4 = SSL_ON or SSL_OFF
* arg4 = pointer to remote_t
*/
int magic_socket (int, int, int, int,remote_t *);
/* Creates the SSL context and loads the most used algorithms , no arguments are required */
SSL_CTX *magic_initctx(void);
/* shows certificates currently in context */
void magic_showcerts(SSL *);
/* is like a poll() built from select() , this function is the reason
* that connections lag 0.5 seconds in the handshake , you can modify this
* in the variable in microseconds
* timeout.tv_usec = 500000;
*/
int magic_sock_ready (remote_t *);
magic ssl can be found here
End of magic-ssl
Change of basis matrix and its inverse made easy and O(1)
Here's another program ill pase the comment of the program and the link
/*
* This is a simple O(1) algorithm to calculate the change of basis matrix and its inverse
* using some basic theory and a lot of patience :p
* the purpose of this is to 'try' to implement an algorithm to compare two images
* using the vector algebra of the colors and the hausdorff distance , this algorithm
* will calculate the change of matrix of the 'interesting' points in the known image
* to the image that we do not know anything
* Eduardo Ruiz Duarte
* toorandom@gmail.com
*/
Output is like this , i took a known basis from a book and then check with my program..
here's the output.
function that calculate both matrices take as arguments
this.
/* arg1=first basis
* arg2=second basis
* arg3=array of two points that indicate the columns of the forward matrix (to allocate)
* arg4=same as arg3 but is the space to allocate the inverse matrix
*/
void
R2_chbm (R2_base_t A, R2_base_t B, R2_point_t fwdmat[2], R2_point_t invmat[2])
check the main() to see an example.
[beck@dirichlet ~]$ ./cob
B1 = { (1.00,3.00) ; (2.00,1.00) } B2 = { (1.00,1.00) ; (2.00,-1.00) }
matriz de ida
0.20 -0.80
0.40 1.40
matriz de regreso
2.33 1.33
-0.67 0.33
Sunday, November 25, 2007
Well, I'm working with a elliptic curve library using a personal MP library.
The library has some problems and I'm porting to 64 bit, one thing I have is that
Sometimes i get Double-free errors when freeing malloced stuff.
I did a little function that wraps free() called 'sfree()'
It writes in the memory address that allocates the pointee (memory address to the data)
And makes the pointee NULL, so you can verify if the function has been freed without using
a structure that handles the status of a pointer.
The way i did is sending the memory address of the pointer instead of the pointer
using a macro to permit the user not to type the & and writing the NULL value using a void **
This idea came with a conversation with Rommel in a starbucks
but well the code is here
Maybe this can be useful for you.
Eduardo Ruiz Duarte (beck)
The library has some problems and I'm porting to 64 bit, one thing I have is that
Sometimes i get Double-free errors when freeing malloced stuff.
I did a little function that wraps free() called 'sfree()'
It writes in the memory address that allocates the pointee (memory address to the data)
And makes the pointee NULL, so you can verify if the function has been freed without using
a structure that handles the status of a pointer.
The way i did is sending the memory address of the pointer instead of the pointer
using a macro to permit the user not to type the & and writing the NULL value using a void **
This idea came with a conversation with Rommel in a starbucks
but well the code is here
Maybe this can be useful for you.
Eduardo Ruiz Duarte (beck)
Tuesday, October 09, 2007
Universidad de Manizales.
Di unas charlas en la universidad de Manizales Colombia.
Me parecio una excelente experiencia, encontre gente de bastante nivel.
Y comunidades relacionadas con hacking interesantes en funcion de las Mexicanas.
DragonJar me parece que se llaman.
Felicidades por el Wargame.
Las ponencias que di fueron.
- Criptografia asimetrica con curvas elipticas
- Esteganografia VS Criptografia
todos los codigos son libres Excepto el de Esteganografia con JPEG.
No es del todo "cerrado" si quieres el codigo... te lo paso por mail
Especialmente a Colombianos quienes conocieron el funcionamiento de este.
La criptografia con curvas elipticas tambien las pondre online , en el transcurso
de los siguientes dos dias.
Si estas interesado en el codigo de JPEG diganme
mi correo es beck [ a t ] math [ d o t ] co [ d o t ] r o
Los codigos que publicare libres son
1. Lightmp 0.2 (Biblioteca de operaciones aritmeticas y modulares con numeros grandes)
2. LECC 0.1 (Biblioteca de operaciones en grupo abeliano en ECC sobre campo finito de caracteristica P usando biblioteca anterior
3. ECC 0.2 Implementacion de Elgamal con curvas elipticas usando las biblitoecas anteriores
4. BSTEG 0.1 Implementacion sencilla para ocultar datos en imagenes sin compresion
5. libellenbeckfract 0.3 , fractal viewer
6. GraphFile 0.1 Graficador de archivos para comparacion de entropias
7. jEncode/jDecode 0.1 Esteganografia JPEG sin aumento de tamanio en archivo y
sin decremento de calidad en 0.2% (Solo Binarios para Windows x86 Cygwin (NO vista)/Linux64 x86_64/Linux32 x86 /Solaris64 SPARC/x86_64 /Solaris32 x86) si quisieras los codigos de este ultimo. me mandaras un correo diciendome porque.
8. Biblioteca de numeros complejos
9. Biblioteca de manejo de polinomios (para elementos en campos de Galois)
10. codigos mas sencilos de probabilidad , entropia, etc..
Tendran Prioridad las personas de Manizales Colombia.
La razon por la que no es libre es porque esta muy feo el codigo y no esta comentado NADA y los nombres de las variables son feas y estan hechas con los pies ... pero funciona.
Saludos
Di unas charlas en la universidad de Manizales Colombia.
Me parecio una excelente experiencia, encontre gente de bastante nivel.
Y comunidades relacionadas con hacking interesantes en funcion de las Mexicanas.
DragonJar me parece que se llaman.
Felicidades por el Wargame.
Las ponencias que di fueron.
- Criptografia asimetrica con curvas elipticas
- Esteganografia VS Criptografia
todos los codigos son libres Excepto el de Esteganografia con JPEG.
No es del todo "cerrado" si quieres el codigo... te lo paso por mail
Especialmente a Colombianos quienes conocieron el funcionamiento de este.
La criptografia con curvas elipticas tambien las pondre online , en el transcurso
de los siguientes dos dias.
Si estas interesado en el codigo de JPEG diganme
mi correo es beck [ a t ] math [ d o t ] co [ d o t ] r o
Los codigos que publicare libres son
1. Lightmp 0.2 (Biblioteca de operaciones aritmeticas y modulares con numeros grandes)
2. LECC 0.1 (Biblioteca de operaciones en grupo abeliano en ECC sobre campo finito de caracteristica P usando biblioteca anterior
3. ECC 0.2 Implementacion de Elgamal con curvas elipticas usando las biblitoecas anteriores
4. BSTEG 0.1 Implementacion sencilla para ocultar datos en imagenes sin compresion
5. libellenbeckfract 0.3 , fractal viewer
6. GraphFile 0.1 Graficador de archivos para comparacion de entropias
7. jEncode/jDecode 0.1 Esteganografia JPEG sin aumento de tamanio en archivo y
sin decremento de calidad en 0.2% (Solo Binarios para Windows x86 Cygwin (NO vista)/Linux64 x86_64/Linux32 x86 /Solaris64 SPARC/x86_64 /Solaris32 x86) si quisieras los codigos de este ultimo. me mandaras un correo diciendome porque.
8. Biblioteca de numeros complejos
9. Biblioteca de manejo de polinomios (para elementos en campos de Galois)
10. codigos mas sencilos de probabilidad , entropia, etc..
Tendran Prioridad las personas de Manizales Colombia.
La razon por la que no es libre es porque esta muy feo el codigo y no esta comentado NADA y los nombres de las variables son feas y estan hechas con los pies ... pero funciona.
Saludos
Friday, January 05, 2007
Algunos fractales que hice con mi implementacion de fractales de julia en C
le hice una modificacion la cual ya no renderea doble por cada click para
hacer zoom
Bajar aplicacion: aqui









beck
rduarte@ciencias.unam.mx
le hice una modificacion la cual ya no renderea doble por cada click para
hacer zoom
Bajar aplicacion: aqui
beck
rduarte@ciencias.unam.mx
Wednesday, November 29, 2006
Hice un programa que rompe vigenere... o por lo menos hace una estadistica rapida,
y te arroja una clave posible.
Si la contrasenia que te arroja no sirve, de todos modos sirve que te dice las distancias y el factor mas repetido usando Kasiski, hice algunas pruebas, el password es BORGES en el siguiente ejemplo , mi programa arrojo DORGLS , si hiciera mas probabilidades de password con combinaciones de letras mas frecuentes tal vez seria mas eficiente pero 'la talacha' del algoritmo ya esta hecha por si les interesa... mas o menos asi funciona..., lo hice analizando de 3 en 3 palabras , tiene que pegarme el criptotexto en el argumento del programa y al final ponerle un numero , en este caso fue el "3" , que significa que analizara kasiski con palabras de 3 letras, les dejo el codigo si lo quieren, se le puede hacer una modificacion si gustan para que en vez de sacarlo de linea de comandos el criptotexto , mejor lo sacara de un archivo.. pero si lo necesitan con mucho gusto comenten.
dirichlet@beck /home/dirichlet/cryptanalysis/bvigenere $ ./bvigenere DIVTXSOELKIDDC
EJSJMSYGFABRZILGBZQUVJPJRGLSCSIARSGWVYXSFBVRGAFZFKPRPFIUHWTSRHENFFPRIVJXFGPUPBU
UVNBAFYNMOHFYRGUSMUCSMZVBEJQCIWYWOCMGWSBULGRLBFVRLSNPIKPWDCEZIKUCVRGGORFXTWSCVR
DGSFFKBYMODURGNSMUCSNCIOVVFVRSFJFSEZSFDSJKPUPBUUVDFZCKZGIOJZEWMQZKPGBZCGpSHSEZI
KFDIKKMOHRHEIVSRTMEBZVYIKUSVRDGSFFVIJNOEKGAPSEARJJBTURWTHRHEJPMVTHGMCJNYWTCJJIT
BXFJIDBGDKWSTSCISFECIYIVFGVTXWORZUHWMNFXVGZGVLYWESJVYWTSCFSJSCSAWUPOCISFECIEEDO
CVTGGOHIGVDPGLVPADCRRPGSCGGVSRIVRSDMSMGWWFGKKPWQWUOSIVSRRMKUOJKQMDVRYSYBOCGGSCO
IKPRPFIUPWEWAULWSARTSQBVZIIDBGFME 3
Distancias obtenidas
354,138,210,349,102,426,426,426,426,426,294,312,186,234,357,126,126,126,126,126,
156,78,78,78,318,59,342,306,96,96,120,12,252,108,108,108,108,108,241,42,48,198,1
72,198,60,180,180,42,54,54,54,54,54,53,49,
Multiplos obtenidos de las distancias
49,49,17,5,48,12,5,23,5,2,16,6,10,5,3,3,23,4,11,2,5,6,10,5,2,2,2,8,6,10,2,3,2,3,
2,2,10,2,4,6,2,5,6,2,2,2,2,5,6,5,2,2,2,5,5,
Prioridad 1 para posible tamanio de password es 6
Prioridad 2 para posible tamanio de password es 6
Prioridad 3 para posible tamanio de password es 3
Posible Clave: DORGLS
dirichlet@beck /home/dirichlet/cryptanalysis/bvigenere $
Eduardo Ruiz Duarte
Codigo, si gustan que lo comente , diganme... esto es con propositos estrictamente personales para poder hacer mi tarea sin tener que andar contando , en efecto la hice y tarde en hacer este codigo un par de horas y la tarea era como para 140 horas.
me pusieron 12 de calificacion de hecho por haberla entregado unas horas despues....
pero si gustan ... con mucho gusto les comento el codigo , pero quiero saber que esto no sera en vano.
Saludos
"Education is a system of imposed ignorance"
y te arroja una clave posible.
Si la contrasenia que te arroja no sirve, de todos modos sirve que te dice las distancias y el factor mas repetido usando Kasiski, hice algunas pruebas, el password es BORGES en el siguiente ejemplo , mi programa arrojo DORGLS , si hiciera mas probabilidades de password con combinaciones de letras mas frecuentes tal vez seria mas eficiente pero 'la talacha' del algoritmo ya esta hecha por si les interesa... mas o menos asi funciona..., lo hice analizando de 3 en 3 palabras , tiene que pegarme el criptotexto en el argumento del programa y al final ponerle un numero , en este caso fue el "3" , que significa que analizara kasiski con palabras de 3 letras, les dejo el codigo si lo quieren, se le puede hacer una modificacion si gustan para que en vez de sacarlo de linea de comandos el criptotexto , mejor lo sacara de un archivo.. pero si lo necesitan con mucho gusto comenten.
dirichlet@beck /home/dirichlet/cryptanalysis/bvigenere $ ./bvigenere DIVTXSOELKIDDC
EJSJMSYGFABRZILGBZQUVJPJRGLSCSIARSGWVYXSFBVRGAFZFKPRPFIUHWTSRHENFFPRIVJXFGPUPBU
UVNBAFYNMOHFYRGUSMUCSMZVBEJQCIWYWOCMGWSBULGRLBFVRLSNPIKPWDCEZIKUCVRGGORFXTWSCVR
DGSFFKBYMODURGNSMUCSNCIOVVFVRSFJFSEZSFDSJKPUPBUUVDFZCKZGIOJZEWMQZKPGBZCGpSHSEZI
KFDIKKMOHRHEIVSRTMEBZVYIKUSVRDGSFFVIJNOEKGAPSEARJJBTURWTHRHEJPMVTHGMCJNYWTCJJIT
BXFJIDBGDKWSTSCISFECIYIVFGVTXWORZUHWMNFXVGZGVLYWESJVYWTSCFSJSCSAWUPOCISFECIEEDO
CVTGGOHIGVDPGLVPADCRRPGSCGGVSRIVRSDMSMGWWFGKKPWQWUOSIVSRRMKUOJKQMDVRYSYBOCGGSCO
IKPRPFIUPWEWAULWSARTSQBVZIIDBGFME 3
Distancias obtenidas
354,138,210,349,102,426,426,426,426,426,294,312,186,234,357,126,126,126,126,126,
156,78,78,78,318,59,342,306,96,96,120,12,252,108,108,108,108,108,241,42,48,198,1
72,198,60,180,180,42,54,54,54,54,54,53,49,
Multiplos obtenidos de las distancias
49,49,17,5,48,12,5,23,5,2,16,6,10,5,3,3,23,4,11,2,5,6,10,5,2,2,2,8,6,10,2,3,2,3,
2,2,10,2,4,6,2,5,6,2,2,2,2,5,6,5,2,2,2,5,5,
Prioridad 1 para posible tamanio de password es 6
Prioridad 2 para posible tamanio de password es 6
Prioridad 3 para posible tamanio de password es 3
Posible Clave: DORGLS
dirichlet@beck /home/dirichlet/cryptanalysis/bvigenere $
Eduardo Ruiz Duarte
Codigo, si gustan que lo comente , diganme... esto es con propositos estrictamente personales para poder hacer mi tarea sin tener que andar contando , en efecto la hice y tarde en hacer este codigo un par de horas y la tarea era como para 140 horas.
me pusieron 12 de calificacion de hecho por haberla entregado unas horas despues....
pero si gustan ... con mucho gusto les comento el codigo , pero quiero saber que esto no sera en vano.
Saludos
/*
bvigenere 0.01 beta
Programa que 'adivina' password de sistema cifrado con vigenere.
si este no fuera el password , de todos modos puede ser util
porque imprime en pantalla las distancias y los multiplos y calcula cual es el que se repite mas , asi como obviamente proporcionar un posible password
esta muy sucio , debe tener algunos memory leaks , y hasta heap overflows...
pero bueno... lo siento... solo que esto lo utilice para hacer mi tarea...
un poco mas interesante y fue lo que me salio a la primera.
Eduardo Ruiz Duarte
rduarte@ciencias.unam.mx
*/
#include
#include
#include
typedef struct kasiski_offsets_t
{
char *word;
int *offsets;
int n;
} kasiski_offsets;
kasiski_offsets *
kasiski_alloc (int s, int w)
{
kasiski_offsets *ptr;
int i;
ptr = calloc (s, sizeof (struct kasiski_offsets_t));
ptr->offsets = calloc (s, sizeof (int));
ptr->n = s;
for (i = 0; i < s + 1; i++)
{
ptr[i].word = calloc (w, sizeof (char));
ptr[i].offsets = calloc (s, sizeof (int));
ptr[i].n = 0;
}
return ptr;
}
void
kasiski_free (kasiski_offsets * ptr)
{
int i;
for (i = 0; i < ptr[0].n; i++)
{
free (ptr[i].word);
free (ptr[i].offsets);
}
// free (ptr);
return;
}
int
is_allocated (char *str, int w, kasiski_offsets * words, int index)
{
int i = 0;
char *t = calloc (w, sizeof (char));
memcpy (t, str, w);
for (i = 0; i < index; i++)
{
if (strcmp (t, words[i].word) == 0)
{
free (t);
return 1;
}
}
free (t);
return 0;
}
void
give_me_distances (kasiski_offsets * w, unsigned int *d, int slen)
{
int i, j, k, t, c = 0;
for (i = 0; i < slen; i++)
for (j = 0; j < w[i].n; i++)
for (k = 0; k < w[i].n; k++)
{
t = abs (w[i].offsets[j] - w[i].offsets[k]);
if ((t != 0) || (j < k))
d[c++] = t;
}
printf ("Distancias obtenidas\n");
for (i = 0; i < c; i++)
printf ("%d,", d[i]);
printf ("\n");
return;
}
int
max (unsigned int *x, int l)
{
int i, t = 0;
for (i = 0; i < l; i++)
if (t > x[i])
t = x[i];
return t;
}
char
max_index (char *x, int l)
{
int i, t = 0, r;
for (i = 0; i < l; i++)
{
if (t < x[i])
{
t = x[i];
r = i;
}
}
return r;
}
#define MAX_FACTORS 8112
#define MAX_POSIBLES 3
int
usual_factor (int *x, int xlen, int *pos)
{
int i, t = 0, r, j, m = 0;
printf ("Multiplos obtenidos de las distancias\n");
for (i = 0; i < xlen; i++)
{
if (x[i] > 1)
printf ("%d,", x[i]);
}
printf ("\n");
for (j = 2; j < xlen; j++)
{
for (i = j; i < xlen; i++)
{
if (x[i] > 1)
if (t < x[i])
{
t = x[i];
r = i;
}
}
pos[m] = r;
m++;
if (m > MAX_POSIBLES)
return 0;
t = 0;
}
return 0;
}
int *
kasiski_analize_passlen (int *distances, int slen)
{
int i = 0, c = 0, r, k = 0;
static int posibles[MAX_POSIBLES];
unsigned int *factors = calloc (4096, sizeof (unsigned int));
while (distances[i] != 0)
{
for (c = 2; c <= distances[i]; c++)
{
if (distances[i] % c == 0)
{
factors[c] += 1;
k++;
}
}
i++;
}
r = usual_factor (factors, k, (int *) &posibles);
for (i = 0; i < MAX_POSIBLES; i++)
printf ("Prioridad %d para posible tamanio de password es %d \n", i + 1,
posibles[MAX_POSIBLES - i]);
free (factors);
return (int *) &posibles;
}
#define MAX_PASSLEN 32
#define MAIN_LETTER 'E'
char
get_letter (char *buf, int blen)
{
int i;
char alfa[26];
buf[blen] = 0;
memset (&alfa, 0, sizeof (alfa));
for (i = 0; i < blen; i++)
alfa[buf[i] - 'A']++;
return abs (max_index ((char *) &alfa, 26) + 'A' - MAIN_LETTER) + 'A';
}
void
calc_pass (char alfa[MAX_PASSLEN][256], int len, char *pass, int alen)
{
int i;
memset (pass, 0x0, MAX_PASSLEN);
for (i = 0; i < len; i++)
pass[i] = get_letter (alfa[i], alen);
printf ("Posible Clave: %s\n", pass);
}
void
kasiski_get_pass (char *buf, int blen, int *plen, int pnum, char *pass)
{
int i, j, k = 0, m;
char alfa[MAX_PASSLEN][256];
m = plen[MAX_POSIBLES - 1];
memset (&alfa, 0, sizeof (alfa));
for (j = 0; j < m; j++)
{
for (i = j; i < blen; i += m)
{
alfa[j][k] = buf[i];
k++;
}
k = 0;
}
calc_pass (alfa, m, pass, blen / m);
return;
}
void
kasiski_attack (char *str, int s, int w, kasiski_offsets * words,
unsigned int *distances)
{
char *tmp = calloc (w + 1, sizeof (char));
char *tmp2 = calloc (w + 1, sizeof (char));
char pass[MAX_PASSLEN];
int *plen;
int i, j, k = 0, m = 0, strcount = 0, d_alloc = 0;
for (j = 0; j < s; j++)
{
words[j].n = 0;
if (!is_allocated ((str + j), w, words, s))
{
memcpy (words[strcount].word, str + j, w);
for (i = 0; i < s; i++)
{
memcpy (tmp2, str + i, w);
if (strcmp (words[strcount].word, tmp2) == 0)
{
words[strcount].offsets[m++] = i;
words[strcount].n += 1;
d_alloc++;
}
}
strcount++;
}
m = 0;
}
k = 0;
distances = calloc (d_alloc, sizeof (int));
give_me_distances (words, distances, d_alloc);
plen = kasiski_analize_passlen (distances, d_alloc);
kasiski_get_pass (str, s, plen, MAX_POSIBLES, (char *) &pass);
free (tmp);
return;
}
int
main (int argc, char **argv)
{
int *distances;
if(argc < 3) {
fprintf(stderr,"ERROR: Necesitas proporcionar el criptotexto en argv[1] y en argv[2] el numero (tamanio de palabra) con el cual vas a analizar usando kasiski para las distancias (recomendados: 2,3,4 o 5)\n");
}
kasiski_offsets *shit = kasiski_alloc (strlen (argv[1]), atoi (argv[2]));
kasiski_attack (argv[1], strlen (argv[1]), atoi (argv[2]), shit, distances);
kasiski_free (shit);
return 0;
}
"Education is a system of imposed ignorance"
Wednesday, September 20, 2006
Im very happy in my number theory class , my professor was explaining multiplicative functions , like sigma or phi for integers , my professor told us about RSA , and if someone knew how it worked , of course i love RSA and the theory behind , and i made a program for "demo" im not using my big int library because is just for "showing" how the theory converts into something practic and not magic. i implemented modular exponentiation , greatest common divisor using euclid's algorithm and extended euclid's algorithm with an easy recursive function, is not very commented but the 'print f's explain how rsa works , it just encrypts the number "111" (you can change it) and then decrypts the same number , as i said before , is just for showing , as an argument the rsa function receives the 2 prime numbers to generate the keys, i made this very fast. so ill comment it later.
i hope someone can test it and i hope it can be useful as it was for me.
note: i just accept 2 primes such that the product is bigger than 111 and less than 7800^2 (im using just the processor registers no memory , if you want to check with a more complicated and serius implementation check my rsa implementation for no educational purposes (because it has more computer science than math hehe) using lightMP.
link here
RSA demo
Eduardo Ruiz Duarte
i hope someone can test it and i hope it can be useful as it was for me.
note: i just accept 2 primes such that the product is bigger than 111 and less than 7800^2 (im using just the processor registers no memory , if you want to check with a more complicated and serius implementation check my rsa implementation for no educational purposes (because it has more computer science than math hehe) using lightMP.
link here
RSA demo
Eduardo Ruiz Duarte
Thursday, August 17, 2006
I've been very busy , im working and with lot of math school
I'm taking Graph Theory , I previes took "Graphs and Games"
but this is more serious , the teacher said we all need to know a programming language
to show some algorithms , (this class is gonna be of algorithms , im starting to like some stuff)
im in number theory with cryptography class too, Im working with steganographical tools now
im gonna present something cool , i have a lot of crap for now (crapware) but im gonna clean it
im working now with JPEG just not PNG nor GIF , i have learnt a lot of engineer transforms and lot of
physics just for trying to understand the spectrums using complex algebra , is very cool....
i hope ill publish this soon (i have to give a speech about this so its going to exist very soon this material and C code
not just using LSB , ill use some algorithms anti-Kappa Function and others to simulate a pre-built complexity associated to a unique matrix (see Kolmogorov complexity). another thing , a friend asked me about Binary search trees , he cant understand
so i made a programm.. and well the fate is very curious i was trying to remember some tree things because of a class of Artificial intelligence my professor said i need to know how to search in binary trees and first order logic (im seeing that with Logic II in my school) so illl wait 1 semester to take AI.
Tenex here's the link to the programm , i commented it , and it was good remembering the basics because i always work with hash tables, and all guys who want to know something basic about tree's heres the explanation , if you still not understand , check on internet about binary search tree's or send me an email. rduarte@ciencias.unam.mx.
Note: Try to see it with a format like VI with colors , it looks better than checking the code online in my website
Eduardo Ruiz Duarte
Source code
I'm taking Graph Theory , I previes took "Graphs and Games"
but this is more serious , the teacher said we all need to know a programming language
to show some algorithms , (this class is gonna be of algorithms , im starting to like some stuff)
im in number theory with cryptography class too, Im working with steganographical tools now
im gonna present something cool , i have a lot of crap for now (crapware) but im gonna clean it
im working now with JPEG just not PNG nor GIF , i have learnt a lot of engineer transforms and lot of
physics just for trying to understand the spectrums using complex algebra , is very cool....
i hope ill publish this soon (i have to give a speech about this so its going to exist very soon this material and C code
not just using LSB , ill use some algorithms anti-Kappa Function and others to simulate a pre-built complexity associated to a unique matrix (see Kolmogorov complexity). another thing , a friend asked me about Binary search trees , he cant understand
so i made a programm.. and well the fate is very curious i was trying to remember some tree things because of a class of Artificial intelligence my professor said i need to know how to search in binary trees and first order logic (im seeing that with Logic II in my school) so illl wait 1 semester to take AI.
Tenex here's the link to the programm , i commented it , and it was good remembering the basics because i always work with hash tables, and all guys who want to know something basic about tree's heres the explanation , if you still not understand , check on internet about binary search tree's or send me an email. rduarte@ciencias.unam.mx.
Note: Try to see it with a format like VI with colors , it looks better than checking the code online in my website
Eduardo Ruiz Duarte
Source code
Thursday, July 06, 2006
Batman......

Realmente yo no soy panista ni perredista ni priista etc..
tal vez mi punto sea de izquierda.. pero eso no quiere decir que me guste lo que AMLO propone.
Ahora el PAN gobernara con Felipe Calderon Hinojosa , no dudo que sea alguien preparado pero solo hay que tomar cosas en cuenta, el FOBAPROA era un fondo en caso de emergencia para los bancos , en caso de que muchos retiren su dinero del pais , poder seguir otorgando creditos etc.. porque el dinero de la gente con credito, es dinero de las personas que almacenan en los bancos , asi es como funcionan los bancos, como decia mi maestro de civismo en secundaria "Los bancos son las venas del pais" y si es cierto , es por ahi donde se mueve el dinero, los bancos en mexico sacan ventaja de los intereses generados y eso es lo que ellos ganan, ya que los bancos no tienen dinero como tal , viven de prestamos de sus clientes, y eso no es malo , asi funcionan todos los bancos en el mundo , y en todos los paises debe de existir un FOBAPROA equivalente , ahora , ese dinero no fue para eso , se privatizo una empresa grande, se retiro ese dinero del Pais , se devalua la moneda porque esos pesos se convierten en dolares, se usa el fondo , y despues ya no existe ese fondo por prestamos gigantes , y derrepente las tasas de interes suben , gente pierde sus creditos hipotecarios, etc... y despues la gente no tiene dinero en el banco , y cuando lo recuperan despues... simplemente lo sacan del pais por miedo y sube mas el dolar, eso es de manera superflua.
1) El PAN y Felipe Calderon tuvieron mucho que ver en que el FOBAPROA sea una deuda publica junto con el PRI, muchos no se dan cuenta pero realmente pagan eso, sus impuestos son para eso , nadie lo sabe... por eso no hay avance. realmente tus impuestos puede que no sean para el bien del pais... sino para pagar lo que algunos empresarios obtuvieron de beneficio en el fobaproa (pagar sus 'prestamos')
2) El pan tuvo que ver en la creacion del IPAB , el nuevo fobaproa.
3) Esperemos que no se privatice nada, (Petroleo , Luz) , diciendo que esto abre la libre competencia en Mexico.
disfrazandose de antimonopolio para que entren varias empresas al pais a hacer competencia en estos servicios.
A menos de que entraran MUCHISIMAS empresas aunque sean extranjeras, para pagar muchos impuestos.
Igual y estoy mal , no soy nostradamus , igual y nose nada de politica , pero eso es lo que pienso
Links y documentos interesantes.
Calderon y FOBAPROA
Lista negra FOBAPROA
Eduardo Ruiz Duarte
Realmente yo no soy panista ni perredista ni priista etc..
tal vez mi punto sea de izquierda.. pero eso no quiere decir que me guste lo que AMLO propone.
Ahora el PAN gobernara con Felipe Calderon Hinojosa , no dudo que sea alguien preparado pero solo hay que tomar cosas en cuenta, el FOBAPROA era un fondo en caso de emergencia para los bancos , en caso de que muchos retiren su dinero del pais , poder seguir otorgando creditos etc.. porque el dinero de la gente con credito, es dinero de las personas que almacenan en los bancos , asi es como funcionan los bancos, como decia mi maestro de civismo en secundaria "Los bancos son las venas del pais" y si es cierto , es por ahi donde se mueve el dinero, los bancos en mexico sacan ventaja de los intereses generados y eso es lo que ellos ganan, ya que los bancos no tienen dinero como tal , viven de prestamos de sus clientes, y eso no es malo , asi funcionan todos los bancos en el mundo , y en todos los paises debe de existir un FOBAPROA equivalente , ahora , ese dinero no fue para eso , se privatizo una empresa grande, se retiro ese dinero del Pais , se devalua la moneda porque esos pesos se convierten en dolares, se usa el fondo , y despues ya no existe ese fondo por prestamos gigantes , y derrepente las tasas de interes suben , gente pierde sus creditos hipotecarios, etc... y despues la gente no tiene dinero en el banco , y cuando lo recuperan despues... simplemente lo sacan del pais por miedo y sube mas el dolar, eso es de manera superflua.
1) El PAN y Felipe Calderon tuvieron mucho que ver en que el FOBAPROA sea una deuda publica junto con el PRI, muchos no se dan cuenta pero realmente pagan eso, sus impuestos son para eso , nadie lo sabe... por eso no hay avance. realmente tus impuestos puede que no sean para el bien del pais... sino para pagar lo que algunos empresarios obtuvieron de beneficio en el fobaproa (pagar sus 'prestamos')
2) El pan tuvo que ver en la creacion del IPAB , el nuevo fobaproa.
3) Esperemos que no se privatice nada, (Petroleo , Luz) , diciendo que esto abre la libre competencia en Mexico.
disfrazandose de antimonopolio para que entren varias empresas al pais a hacer competencia en estos servicios.
A menos de que entraran MUCHISIMAS empresas aunque sean extranjeras, para pagar muchos impuestos.
Igual y estoy mal , no soy nostradamus , igual y nose nada de politica , pero eso es lo que pienso
Links y documentos interesantes.
Calderon y FOBAPROA
Lista negra FOBAPROA
Eduardo Ruiz Duarte
Friday, June 16, 2006
I made a little program , to multiply or sum 2 digits of ulimited size (hehe limited to your RAM memory)
im working in a version with base SQRT(2^64)-1 (aprox 2^32) for taking advantage of the CPU operations
that the computer can compute... but for now is just 1 byte per digit so complexity is no more nor less than O(n2)
im working with that , and karatsuba combined with the previus idea i said , im working with exponentiation to a
big integer and logarithm as the integral of 1/x using sums, with this ill do square root and power (modulo and div are done but im going to publish them maybe in 1 week after y put comments in the code)
i hope you can find this useful
beck
(Eduardo Ruiz Duarte)
Download it here
im working in a version with base SQRT(2^64)-1 (aprox 2^32) for taking advantage of the CPU operations
that the computer can compute... but for now is just 1 byte per digit so complexity is no more nor less than O(n2)
im working with that , and karatsuba combined with the previus idea i said , im working with exponentiation to a
big integer and logarithm as the integral of 1/x using sums, with this ill do square root and power (modulo and div are done but im going to publish them maybe in 1 week after y put comments in the code)
i hope you can find this useful
beck
(Eduardo Ruiz Duarte)
Download it here
Wednesday, May 31, 2006
Interview with anakata (main member and founder of the staff thepiratebay.com)
I have contact with a member of the piratebay via IRC in a server i visit frequently , i worked with him together with other people (dex,daemon,knish) , some time ago...
and he is a very talented person... i have learnt lots of things because of him, here's a conversation we had recently
today at 20:00 GMT-6
[msg(anakata-)] there are rumours about this (hoax)
[anakata-(~anakata@se)] we'll get TPB back up
in 3 or 4 different countries :p
[msg(anakata-)] do you need money (paypal or something)
[msg(anakata-)] are you asking for money to the community ?
[anakata-(~anakata@se)] hm i think we have
enough
[msg(anakata-)] cool , if theres something i could help , maybe i can do a
little donation
[msg(anakata-)] not too much but maybe 200 euros or something
[anakata-(~anakata@se)] kewl
[msg(anakata-)] but i wanted to be sure , that this isnt a hoax :p
[msg(anakata-)] because of the sarcasm and humor that tpb has
[anakata-(~anakata@se)] its not a hoax
[anakata-(~anakata@se)] they also raided my fucking business
[anakata-(~anakata@se)] took ALL equipment in a datacenter
[anakata-(~anakata@se)] several 100 customer boxes
[msg(anakata-)] fuck
[msg(anakata-)] well
[msg(anakata-)] i hope you can fix this shit
[msg(anakata-)] the thing i dont understand , what did you break in sweden ?
[anakata-(~anakata@se)] they just made some shit up to take it down
[msg(anakata-)] maybe , US enterprises said something to government
[msg(anakata-)] about closing relationship (commercial) with sweden
[anakata-(~anakata@se)] yeah
[anakata-(~anakata@se)] + the prosecutor is mad at prq
[anakata-(~anakata@se)] because we like freedom of speech
[anakata-(~anakata@se)] and he doesn't
[anakata-(~anakata@se)] he raided us like 3 weeks ago also
[anakata-(~anakata@se)] and took 2 servers of a customer
[msg(anakata-)] fuck... well if theres something i could help in mexico (banners , etc..)
[msg(anakata-)] i can help you , i dont have too much money but , maybe theres something i can do for you
[msg(anakata-)] hahaha , dex (diego) said , that you better play unreal , instead of having this problems hahaha
[msg(anakata-)] cool , dude , i hope your business can born again , and i hope you can solve this shit with the
sweden government
[msg(anakata-)] if theres no law about this, then they are breaking the law about this
[msg(anakata-)] but well , i think this conversation is very usual for you now , and you know what you do
[msg(anakata-)] sorry for lot of questions but im concerned ... do you think , you will have problems with jail ?
[anakata-(~anakata@se)] i might go to jail
[msg(anakata-)] dmca and riaa shit ?
[anakata-(~anakata@se)] but swedish jails are kinda nice so not a big problem..
[msg(anakata-)] hahaha
[msg(anakata-)] maybe you will have a compputer
[msg(anakata-)] and thepiratebay.com .. is death officially
[msg(anakata-)] ?
[msg(anakata-)] haha , well i hope you dont go to jail dude seriusly
[msg(anakata-)] i have learn a lot from some code you published :p
[msg(anakata-)] i think you arent in home now right ?
[anakata-(~anakata@se)] no tpb will get back up
[anakata-(~anakata@se)] in the netherlands, ukraine, mexico, possibly russia too
[msg(anakata-)] cool , do you have someone in mind for mexico ?
[anakata-(~anakata@se)] nahual, doh
[msg(anakata-)] haha cool
[msg(anakata-)] ok , thanks dude... , do you let me publish this in my site 'as an interview' ?
[msg(anakata-)] or is it 'kinda private'
[anakata-(~anakata@se)] yes
[msg(anakata-)] ok dude
[msg(anakata-)] thanks dude , back to work , and good , luck , if i can help you here in mexico , please just say
what you need
[msg(anakata-)] bye
*o* Ending conversation with anakata-
I have contact with a member of the piratebay via IRC in a server i visit frequently , i worked with him together with other people (dex,daemon,knish) , some time ago...
and he is a very talented person... i have learnt lots of things because of him, here's a conversation we had recently
today at 20:00 GMT-6
[msg(anakata-)] there are rumours about this (hoax)
[anakata-(~anakata@se)] we'll get TPB back up
in 3 or 4 different countries :p
[msg(anakata-)] do you need money (paypal or something)
[msg(anakata-)] are you asking for money to the community ?
[anakata-(~anakata@se)] hm i think we have
enough
[msg(anakata-)] cool , if theres something i could help , maybe i can do a
little donation
[msg(anakata-)] not too much but maybe 200 euros or something
[anakata-(~anakata@se)] kewl
[msg(anakata-)] but i wanted to be sure , that this isnt a hoax :p
[msg(anakata-)] because of the sarcasm and humor that tpb has
[anakata-(~anakata@se)] its not a hoax
[anakata-(~anakata@se)] they also raided my fucking business
[anakata-(~anakata@se)] took ALL equipment in a datacenter
[anakata-(~anakata@se)] several 100 customer boxes
[msg(anakata-)] fuck
[msg(anakata-)] well
[msg(anakata-)] i hope you can fix this shit
[msg(anakata-)] the thing i dont understand , what did you break in sweden ?
[anakata-(~anakata@se)] they just made some shit up to take it down
[msg(anakata-)] maybe , US enterprises said something to government
[msg(anakata-)] about closing relationship (commercial) with sweden
[anakata-(~anakata@se)] yeah
[anakata-(~anakata@se)] + the prosecutor is mad at prq
[anakata-(~anakata@se)] because we like freedom of speech
[anakata-(~anakata@se)] and he doesn't
[anakata-(~anakata@se)] he raided us like 3 weeks ago also
[anakata-(~anakata@se)] and took 2 servers of a customer
[msg(anakata-)] fuck... well if theres something i could help in mexico (banners , etc..)
[msg(anakata-)] i can help you , i dont have too much money but , maybe theres something i can do for you
[msg(anakata-)] hahaha , dex (diego) said , that you better play unreal , instead of having this problems hahaha
[msg(anakata-)] cool , dude , i hope your business can born again , and i hope you can solve this shit with the
sweden government
[msg(anakata-)] if theres no law about this, then they are breaking the law about this
[msg(anakata-)] but well , i think this conversation is very usual for you now , and you know what you do
[msg(anakata-)] sorry for lot of questions but im concerned ... do you think , you will have problems with jail ?
[anakata-(~anakata@se)] i might go to jail
[msg(anakata-)] dmca and riaa shit ?
[anakata-(~anakata@se)] but swedish jails are kinda nice so not a big problem..
[msg(anakata-)] hahaha
[msg(anakata-)] maybe you will have a compputer
[msg(anakata-)] and thepiratebay.com .. is death officially
[msg(anakata-)] ?
[msg(anakata-)] haha , well i hope you dont go to jail dude seriusly
[msg(anakata-)] i have learn a lot from some code you published :p
[msg(anakata-)] i think you arent in home now right ?
[anakata-(~anakata@se)] no tpb will get back up
[anakata-(~anakata@se)] in the netherlands, ukraine, mexico, possibly russia too
[msg(anakata-)] cool , do you have someone in mind for mexico ?
[anakata-(~anakata@se)] nahual, doh
[msg(anakata-)] haha cool
[msg(anakata-)] ok , thanks dude... , do you let me publish this in my site 'as an interview' ?
[msg(anakata-)] or is it 'kinda private'
[anakata-(~anakata@se)] yes
[msg(anakata-)] ok dude
[msg(anakata-)] thanks dude , back to work , and good , luck , if i can help you here in mexico , please just say
what you need
[msg(anakata-)] bye
*o* Ending conversation with anakata-
Tuesday, May 09, 2006
I made a steganographical tool called bsteg to hide data in BMP images , im working now to support JPEG files using VIPS and fft i need this because of the lossy compression nature of this formats , so i need to locate the highest frequency pixels in a image , and then use those with a simply LSB interchange with the original data.
its fun ... ill publish this this week , i hope i can finish it. , the thing is , maybe ill now use fft , the discrete cosine transform can do the same , and it works with pure real numbers , so , i dont want complex numbers for now... so maybe ill need to switch.. (i thought in that at this moment) i hope you like it
Download bsteg now
Eduardo Ruiz Duarte (beck)
its fun ... ill publish this this week , i hope i can finish it. , the thing is , maybe ill now use fft , the discrete cosine transform can do the same , and it works with pure real numbers , so , i dont want complex numbers for now... so maybe ill need to switch.. (i thought in that at this moment) i hope you like it
Download bsteg now
Eduardo Ruiz Duarte (beck)
Monday, April 24, 2006
http://www.pejendejo.net
Excelente sitio , yo estoy totalmente de acuerdo.. intente poner un comentario en la pagina y no salio, lo intente 3 veces o mas , tal vez por desesperado posteriormente salga muchas veces , pero si no sale.. aqui dejo mi post, yo no estoy a favor de ningun partido , es mas , me vale
las razones estan en ese post... creo q es la primera y ultima vez que meto cosas de este topico aqui.. tengo amigos prdistas y panistas no se me ofendan , es parte de mi libertad de expresion.
Saludos.
Eso de el apoyo a los pobres y 'a los que menos tienen'
deberia de ser otorgando empleos... mas no regalando el dinero como lo hace con los 'viejitos', yo no le regalo nada a nadie (impuestos) , mejor que trabajen , o que se invierta en instituciones para personas de la tercera edad... asi se otorgarian empleos a otras personas cuidando a estos individuos.
yo no votare, ni ire a anular mi voto... es mas ni me interese por tener credencial de elector, tengo 21 anios... simplemente no se me hace adecuado el sistema mucha gente me dice: 'minimo ve a poner lo que sea'
pero bueno para que pierdo mi tiempo en un sistema que de todos modos no funciona democraticamente... todos los candidatos estan educados de tal forma que al llegar al poder solo se preocupan por intereses de su partido , incluso en la camara legislativa lo unico que hacen es abuchearse , poner pancartas ofensivas... se me hace una falta de respeto , ya que estando en ese lugar , sea lo que sea deberia de unificarse todo , mas no seguir en una condicion de 'tu eres del pri y yo del pan y ese wey del prd' ... etc.. se deben de debatir intereses de la nacion mas no intereses partidarios... que porqueria me da lastima , y es por la unica causa la cual no me gusta este pais tan hermoso, es como si lo hermoso lo taparan con caca (gobierno)
Saludos
Eduardo Ruiz Duarte
Excelente sitio , yo estoy totalmente de acuerdo.. intente poner un comentario en la pagina y no salio, lo intente 3 veces o mas , tal vez por desesperado posteriormente salga muchas veces , pero si no sale.. aqui dejo mi post, yo no estoy a favor de ningun partido , es mas , me vale
las razones estan en ese post... creo q es la primera y ultima vez que meto cosas de este topico aqui.. tengo amigos prdistas y panistas no se me ofendan , es parte de mi libertad de expresion.
Saludos.
Eso de el apoyo a los pobres y 'a los que menos tienen'
deberia de ser otorgando empleos... mas no regalando el dinero como lo hace con los 'viejitos', yo no le regalo nada a nadie (impuestos) , mejor que trabajen , o que se invierta en instituciones para personas de la tercera edad... asi se otorgarian empleos a otras personas cuidando a estos individuos.
yo no votare, ni ire a anular mi voto... es mas ni me interese por tener credencial de elector, tengo 21 anios... simplemente no se me hace adecuado el sistema mucha gente me dice: 'minimo ve a poner lo que sea'
pero bueno para que pierdo mi tiempo en un sistema que de todos modos no funciona democraticamente... todos los candidatos estan educados de tal forma que al llegar al poder solo se preocupan por intereses de su partido , incluso en la camara legislativa lo unico que hacen es abuchearse , poner pancartas ofensivas... se me hace una falta de respeto , ya que estando en ese lugar , sea lo que sea deberia de unificarse todo , mas no seguir en una condicion de 'tu eres del pri y yo del pan y ese wey del prd' ... etc.. se deben de debatir intereses de la nacion mas no intereses partidarios... que porqueria me da lastima , y es por la unica causa la cual no me gusta este pais tan hermoso, es como si lo hermoso lo taparan con caca (gobierno)
Saludos
Eduardo Ruiz Duarte
Wednesday, April 19, 2006
Im back from cancun , soon ill publish some pics.
another thing is , I remembering some posix threads stuff (pthreads)
and i made a program to test some things like thread organization in a
server application using concurrent connections without asynchronous I/O
it has a timeout using select , and connection checking status
if you are interested , i made a commented code for all of you that may be interested
source here
this can be very useful for those who want a pthread server , with this source , you just need
to edit the void *session function to do whatever you want to do and use it .
Eduardo Ruiz Duarte
another thing is , I remembering some posix threads stuff (pthreads)
and i made a program to test some things like thread organization in a
server application using concurrent connections without asynchronous I/O
it has a timeout using select , and connection checking status
if you are interested , i made a commented code for all of you that may be interested
source here
this can be very useful for those who want a pthread server , with this source , you just need
to edit the void *session function to do whatever you want to do and use it .
Eduardo Ruiz Duarte
Friday, April 07, 2006
Im going to Cancun, with my girlfriend , my flight is at 7th april 20:55
ill take some pics to show here. im just waiting for my girl here in my work
then we are going to my house and eat something before the flight.
its 17:00 i think i need to hurry. but im here ...
nice holidays
your friend
Eduardo Ruiz (beck)
ill take some pics to show here. im just waiting for my girl here in my work
then we are going to my house and eat something before the flight.
its 17:00 i think i need to hurry. but im here ...
nice holidays
your friend
Eduardo Ruiz (beck)
Saturday, March 25, 2006
Asynchronous I/O rocks.
I used to use poll() / select() to check if a filedescriptor
was ready for writing/reading, for reading i learnt something
new.. i didnt know nothing about AIO things, so i made some
tests with this asynchronous functions... aio_read , aio_write ,
aio_cancel , aio_suspend , etc.. and is very easy. aio in unix
uses pthreads to read() a FD and continue the execution
of the process (i mean aio functions return a value immediatly).
Its good to know this type of methods , at the beginning,
if i knew this thing two years ago something different would
happen in my life haha :p
im in a new project related to multiple sockets , i need to
code it and make it work in HP-UX and solaris so i need
to use strictly posix , and i didnt know nothing about AIO.
Another fun thing is that im 'touching' some features of 'hypercube'
webserver code from a good friend anakata
to run on sparc & hpux, anakata use this , thats why i wanted
to learn wtf was happening. maybe this is something i needed to
know, but i didnt.. so , maybe lot of you havent used this.
So here is an example i made to ALL OF YOU , commented,
and i hope i can start being a good programmer.
This examples reads the stdin, and it enters a while(1) { sleep(1); printf(); } loop
and when the buffer is read from stdin a signal is sent and
the program finishes. this can be useful for sockets , poll()
can handle multiple events like urgent packets etc..
but for a "standard" I/O async this is very useful.
remember im not a computologist, but i like lot this shit. hehe
Greetz
Source here
I used to use poll() / select() to check if a filedescriptor
was ready for writing/reading, for reading i learnt something
new.. i didnt know nothing about AIO things, so i made some
tests with this asynchronous functions... aio_read , aio_write ,
aio_cancel , aio_suspend , etc.. and is very easy. aio in unix
uses pthreads to read() a FD and continue the execution
of the process (i mean aio functions return a value immediatly).
Its good to know this type of methods , at the beginning,
if i knew this thing two years ago something different would
happen in my life haha :p
im in a new project related to multiple sockets , i need to
code it and make it work in HP-UX and solaris so i need
to use strictly posix , and i didnt know nothing about AIO.
Another fun thing is that im 'touching' some features of 'hypercube'
webserver code from a good friend anakata
to run on sparc & hpux, anakata use this , thats why i wanted
to learn wtf was happening. maybe this is something i needed to
know, but i didnt.. so , maybe lot of you havent used this.
So here is an example i made to ALL OF YOU , commented,
and i hope i can start being a good programmer.
This examples reads the stdin, and it enters a while(1) { sleep(1); printf(); } loop
and when the buffer is read from stdin a signal is sent and
the program finishes. this can be useful for sockets , poll()
can handle multiple events like urgent packets etc..
but for a "standard" I/O async this is very useful.
remember im not a computologist, but i like lot this shit. hehe
Greetz
Source here
Sunday, March 19, 2006
I just finished doing my database manager , i put the source in public on cofradia.org, a friend told me that i was wrong publishing my source there, that it would been better in a more specialized forum, i wanted critics (im not a computer scientist , neither a programmer , i'm studying to be a mathematician
so i spected technical critics not just crap like "Your code is a shit" , but well , what can i spect of the same script kiddies
that thinks they are hackers or hacktivists or whatever the fuck you want to call them.
but well , people there just say the same bullshit that everybody knows, but nobody applies
1) Need to indent the code
2) need to have a version control
3) need to comment all the source code
4) not to mix different styles of programming
5) compatibility
etc... and all the bullshit you 'learn' in a 'programming I' course in computer engineer.
everybody knows that , but nobody knows how to make a fucking hello world , how to use a processor, or
how to use special features of a processor like intruction pairing , or when to use malloc() and when to NOT use it
or how to use a nonblocking function for filedescriptors , or the difference of poll and select , etc..
in my point of view the code is secure and works fine , and if its not , well , the point of that is the algorithm , im not planning to use it for a root server, is just for me and is fast (hash tables are O(1) (fastest) or O(n) (slowest) ,
but well i dont care , i never said my source was an "innovation" but well people start saying bullshit like
"why you publish something that is not innovative"
i publish it because i want, and if is not innovaative , is the same thing as the useless thing GNOME (dirty code , slow as hell) and there are other better window managers, at the beginning i said that it was for 'educational purposes'
because , everybody knows what the fuck is a hash table , but nobody codes it in a serious way.
blah , is the same bullshit if i say "Why you use linux fucking fanatic" , and you dont use BSD , is the same thing"
(because in mexico 90% of the people who use linux, could make the same shit using a pirate windows XP)
they use it for being elite , or for anti-tech causes like fanatism , or opossition to monopoly's , i support monopoly's
in technology , technology must be standarized for being easier and have the same opportunities for everybody to exists in their life , i use linux , but i use it to test shit of my work to be portable...
but i preffer all the people using microsoft windows , solaris , irix or bsd and not a new crap that is made by thousands of morons like richard stallman thay they feel they are god , but they are nobody.
that tries to copy other unixes to appear like the monopoly's OSes like Novell with the desktop crap trying to be the same as cocoa , or gnome trying to be a Windows but 2000% slower and a fucking cocktail of libraries mapped in memory when displaying a stupid animation, and mmaping lot of megs of bullshit,
in my point of view, the software is being corrupted with lot of pseudo programmers and wannabe's in mexico,
you cant do anything because you get insulted, nobody does anything but they feel they can 'stupidize' the things other people does.
Mexico is a country of egos or whatever the fuck you want to call it , but the point is that people doesnt like to learn with others , and they cannot admit, there are people they could learn from,
linux is not an innovation , as my program , linux doesnt provide new algorithms, neither GNU , gcc is good , but is not an innovation , there are better compilers and better algorithms to parse the code and give more optimization,
Eduardo Ruiz Duarte
so i spected technical critics not just crap like "Your code is a shit" , but well , what can i spect of the same script kiddies
that thinks they are hackers or hacktivists or whatever the fuck you want to call them.
but well , people there just say the same bullshit that everybody knows, but nobody applies
1) Need to indent the code
2) need to have a version control
3) need to comment all the source code
4) not to mix different styles of programming
5) compatibility
etc... and all the bullshit you 'learn' in a 'programming I' course in computer engineer.
everybody knows that , but nobody knows how to make a fucking hello world , how to use a processor, or
how to use special features of a processor like intruction pairing , or when to use malloc() and when to NOT use it
or how to use a nonblocking function for filedescriptors , or the difference of poll and select , etc..
in my point of view the code is secure and works fine , and if its not , well , the point of that is the algorithm , im not planning to use it for a root server, is just for me and is fast (hash tables are O(1) (fastest) or O(n) (slowest) ,
but well i dont care , i never said my source was an "innovation" but well people start saying bullshit like
"why you publish something that is not innovative"
i publish it because i want, and if is not innovaative , is the same thing as the useless thing GNOME (dirty code , slow as hell) and there are other better window managers, at the beginning i said that it was for 'educational purposes'
because , everybody knows what the fuck is a hash table , but nobody codes it in a serious way.
blah , is the same bullshit if i say "Why you use linux fucking fanatic" , and you dont use BSD , is the same thing"
(because in mexico 90% of the people who use linux, could make the same shit using a pirate windows XP)
they use it for being elite , or for anti-tech causes like fanatism , or opossition to monopoly's , i support monopoly's
in technology , technology must be standarized for being easier and have the same opportunities for everybody to exists in their life , i use linux , but i use it to test shit of my work to be portable...
but i preffer all the people using microsoft windows , solaris , irix or bsd and not a new crap that is made by thousands of morons like richard stallman thay they feel they are god , but they are nobody.
that tries to copy other unixes to appear like the monopoly's OSes like Novell with the desktop crap trying to be the same as cocoa , or gnome trying to be a Windows but 2000% slower and a fucking cocktail of libraries mapped in memory when displaying a stupid animation, and mmaping lot of megs of bullshit,
in my point of view, the software is being corrupted with lot of pseudo programmers and wannabe's in mexico,
you cant do anything because you get insulted, nobody does anything but they feel they can 'stupidize' the things other people does.
Mexico is a country of egos or whatever the fuck you want to call it , but the point is that people doesnt like to learn with others , and they cannot admit, there are people they could learn from,
linux is not an innovation , as my program , linux doesnt provide new algorithms, neither GNU , gcc is good , but is not an innovation , there are better compilers and better algorithms to parse the code and give more optimization,
Eduardo Ruiz Duarte
Subscribe to:
Posts (Atom)