Wednesday, October 24, 2012

Accuphase E-205 Repair and Tuning

Repair

Looks like the relays for the speaker protection are gone. After 23 years no surprise.
Since the OMRON G2Z-222P-US 48VDC is not avaiable anymore I have to choose the following:

SCHRACK RT424048
Avaiable from Manufacturer: www.shop.schrack.at


The problem was that the old relays have a total different layout than the new ones, and come in a different size. Here you can see what I mean...the inner 6 points are the new smaller relays.



It is the total anti-design...its fun to design a adapter for that, especially since there is not much space on the PCB.

Cleaning and new Thermal Conductance Paste 

After cleaning the whole Accuphase, the output stages both got new TCP for their transistors.



New Electrolytic Capacitors

I will replace the old Caps with new Panasonic FC/EC Caps.

several Caps from Panasonic FC/EC Series and Vishay




And as for the new caps. Here is a before and after pic. I had to rearrange the new big FC because they were larger than the older ones.
Old vs New




the old caps






Project Euler Problem 44

A simpler one: https://projecteuler.net/problem=44
l= [(3*n*n-n)/2 for n in xrange(1,2500)]
d= dict((x, 1) for x in l)

for e1 in l:
 for e2 in l:
  if e1+e2 in d:
   if e2-e1 in d:
    print e2-e1

Saturday, October 20, 2012

Project Euler Problem 351

ATTENTION: Sloppy slow version, takes a while
pfm.totient = Euler's totient function (write that on your own :P )


It states where the product is over the distinct prime numbers dividing n.
import time
import primefacmodule as pfm

start=time.time()

c=[]

def b(n):
 s=0
 for x in xrange(1,n+1):
  t=pfm.totient(x)
  s+=t
 return n*(n-1)/2 + 1 - s
 
def anzahl(n):
 return 6*(n-1)+6*b(n)

print anzahl(100000000)
print time.time()-start

# n*(n-1)/2 + 1 - sum( phi(i), i=1..n)

Friday, October 19, 2012

The hyperbolic geometry of marine mammals

I found a very interesting book today:
The Universe in Zero Words: The Story of Mathematics as Told Through Equations by Dr. Dana Mackenzie.

It is about the hyperbolic geometry which some animals and plats use, especially marine mammals like whales (they use "chants" for communication).

Since you hardly have light under the oceans surface, most of the marine mammals communicate via sound (whales sing). Fun Fact: The sound waves speed is determined by the depth, which means it travels faster in greater depth. So for a sound wave to travel from point A to point B the fastest way is a curve as seen in the picture. Fun Fact 2: they are arcs of circles centered at the ocean surface!



Another Example:

A collection of crocheted hyperbolic planes, in imitation of a coral reef, by the Institute For Figuring

Monday, October 15, 2012

Fully Homomorphic Encryption - FHM

A new form of encryption allows you to compute with data you cannot read

The Implications are far reaching - just to mention Cloud Computing...

Suppose Alice gives Bob a securely encrypted computer file and asks him to sum a list of numbers she has put inside. Without the decryption key, this task also seems impossible. The encrypted file is just as opaque and impenetrable as the locked suitcase. “Can’t be done,” Bob concludes again.

But Bob is wrong. Because Alice has chosen a very special encryption scheme, Bob can carry out her request. He can compute with data he can’t inspect. The numbers in the file remain encrypted at all times, so Bob cannot learn anything about them. Nevertheless, he can run computer programs on the encrypted data, performing operations such as summation. The output of the programs is also encrypted; Bob can’t read it. But when he gives the results back to Alice, she can extract the answer with her decryption key.

The technique that makes this magic trick possible is called fully homomorphic encryption, or FHE. 



Picture Source: Article on americanscientist (link next line)

If you want to know more, read the Article on FHE on americanscientist.org. You can also read the Thesis Paper of the groundwork of FHM  by Craig Gentry here: http://crypto.stanford.edu/craig/craig-thesis.pdf

Update 23.05.2014

now you can actually use it: https://hcrypt.com/

Sunday, October 14, 2012

vsftpd + TLS/SSL - encrypt ftp sessions


FTP is a very insecure protocol because all passwords and all data are transferred in clear text. By using TLS, the whole communication can be encrypted, thus making FTP much more secure.

  1. Install openssl
  2. mkdir -p /etc/ssl/private && chmod 700 /etc/ssl/private
  3. openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
  4. edit /etc/vsftpd.conf
  5. [...]
    # Turn on SSL
    ssl_enable=YES
    
    # Allow anonymous users to use secured SSL connections
    allow_anon_ssl=YES
    
    # All non-anonymous logins are forced to use a secure SSL connection in order to
    # send and receive data on data connections.
    force_local_data_ssl=YES
    
    # All non-anonymous logins are forced to use a secure SSL connection in order to send the password.
    force_local_logins_ssl=YES
    
    # Permit TLS v1 protocol connections. TLS v1 connections are preferred
    ssl_tlsv1=YES
    
    # Permit SSL v2 protocol connections. TLS v1 connections are preferred
    ssl_sslv2=NO
    
    # permit SSL v3 protocol connections. TLS v1 connections are preferred
    ssl_sslv3=NO
    
    # Disable SSL session reuse (required by WinSCP)
    require_ssl_reuse=NO
    
    # Select which SSL ciphers vsftpd will allow for encrypted SSL connections (required by FileZilla)
    ssl_ciphers=HIGH
    
    # This option specifies the location of the RSA certificate to use for SSL
    # encrypted connections.
    rsa_cert_file=/etc/ssl/private/vsftpd.pem
    [...]
      5. /etc/init.d/vsftpd restart

Wednesday, October 10, 2012

do you enjoy your story?

a long long time ago
there were two people, who looked very much as yourselves
and as with you, they were on a journey
a quest if you will
to find what we all seem to be searching for
for reasons they may never even know
they entered the land of the great atacama and headed south
warm desert winds rose from the sands and guides them through the valley of the moon
a place where time and direction don't exist
yet they still pressed on
soon the horizon flattened out and they crossed the mirror of the sands
the first sign of life, but certainly not the last
soon colors of green and blue cover the hills and they found a new guy - water
tiny streams became great rivers
and they were taken west
past the smoking mountains and floating falls
until they reached the ocean where sunlight grows from the ground and dances from the palm of your hands
they drifted south, each day a new door, a new direction, a new way to be
as days turned to weeks, vision of moving colors and curious creatures passing by
until time simply faded away
and as with all those who have come before you
their path soon came to an end
and they only found me - their future - wild waving
and I asked them the same two question I will some day ask you:
is it possible to be happy with this life?
and then I will ask as to everyone else
do you enjoy your story?

Russell's Teapot


If I were to suggest that between the Earth and Mars there is a china teapot revolving about the sun in an elliptical orbit, nobody would be able to disprove my assertion provided I were careful to add that the teapot is too small to be revealed even by our most powerful telescopes.

But if I were to go on to say that, since my assertion cannot be disproved, it is an intolerable presumption on the part of human reason to doubt it, I should rightly be thought to be talking nonsense.

If, however, the existence of such a teapot were affirmed in ancient books, taught as the sacred truth every Sunday, and instilled into the minds of children at school, hesitation to believe in its existence would become a mark of eccentricity and entitle the doubter to the attentions of the psychiatrist in an enlightened age or of the Inquisitor in an earlier time.
Bertrand Russell 

Thursday, October 4, 2012

The CryptoParty Handbook



This 392 page, Creative Commons licensed handbook is designed to help those with no prior experience to protect their basic human right to Privacy in networked, digital domains. By covering a broad array of topics and use contexts it is written to help anyone wishing to understand and then quickly mitigate many kinds of vulnerability using free, open-source tools. Most importantly however this handbook is intended as a reference for use during Crypto Parties.


I added crypto.cat section
may add post-quantum later :P