Monday, February 25, 2013

Back to basics: Urms

Following a question on PhysicsForum concerning the total Urms (Root Mean Square Potential Difference) due to the remaining alternating component in the half wave rectifier.

The half wave rectifier is obtained by using a single diode to let only half of the sine wave go through.


The source can be any signal, but the most frequent would be a sine signal, for instance coming out of a transformer.If we neglect the drop due to the diode, the potential difference on the load will be half of the sine wave.

Now comes a big question: what DC potential difference would be needed to get the same energy dissipated through a purely resistive load? If we call u(t) the varying, periodic signal and U the potential difference needed to generate the same energy, we get


Where T is the signal's period. Remembering that I=U/R (Ohm's law), we get that

R is constant in time, it can be taken out of the integral, and we end with


Let's go through a few examples.

Sine wave of frequency f and peak Up.

Such a signal can be described by the function


Where ω is the pulsation and is



Rectangular wave of amplitude Up and duty cycle ω


The duty cycle ω is the fraction of the period during which the signal will be at Up. Otherwise, the signal is 0.



And thus

And finally ...

Half wave rectified sine of amplitude Up and frequency f.

This is almost the same as for the full sine wave, except that instead of taking the integral from 0 to T, the integral goes only to T/2. This gives the result

Before moving to a different topic, let's establish a property we will use later.

Let's consider the signal u(t) with period T defined by


And


We will prove that


Let's go!


The part labeled A develops like this

The part labeled B is easy to develop and gives

Substituting back, we conclude that


This result will help us later.

{To be continued!}

Friday, February 22, 2013

Found at Auction: The Unseen Photographs of a Legend that Never Was



For $380, a Chicago real estate agent and historical hobbyist bought a stack of undeveloped films at an auction. His surprise was complete when he started processing them, as he found a very large collection of street pictures.

Of the photographer, Vivien Maier, almost nothing is known.

Some pictures here.

Wednesday, February 20, 2013

The craze of online education

Among all the things the Internet has to offer, the one I find the neatest is all the online resources for learning.

Starting with the "self study" found as free online course material, such as MIT's OpenCourseWare, Yale's Open Yale Courses or  Carnegie Mellon's Open Learning Initiative. These are free materials covering a large number of topics in Sciences, Humanities or Economy. This is slightly more than a self-study book, it may have recording of actual lectures and possibly have assignments with solutions. The great part is that there are social sites such as OpenStudy to gather self students. There you may find some help, people to explain the topics that are less clear, or have a validation of your solutions.

Then, there are some site with a variety of topics, usually presented as lessons. The most famous is undoubtedly the Khan Academy. Each topic and subtopic is presented almost as an independent unit: it is up to the student to have a rational progression through the topics, but nothing will prevent one from starting at the end and making its way back.

And then there are the online lectures such as edX or Coursera which groups courses from various universities or Udacity which has its own courses. These are courses in the more classical academic sense, with a progression through different subtopics. There are assignments and quizzes and one would usually end up with a certificate of completion upon success.

It is to note that the latter start to have a model in which the courses are free, but either the certificate has a small fee or companies can subscribe and get the contacts of the top performers. For instance, Coursera and Udacity give access to corporations, such as Facebook or Twitter, to their registry of students, enabling them to find the talents of tomorrow. Think about it: you are studying in your living room and next thing you know: you have an e-mail from a big company showing some interest in your career. How cool is that?

Bottom line: the online course offering is growing fast and one could find pretty much anything to learn: almost all possible topics are present and available. However, this will not change who people are, and the one who will benefit the most from this are those who could have had other resources to learn this. My hope is that this will be made available to emerging countries as a possible start for a real education once low cost computers and Internet access have been deployed.

Monday, February 18, 2013

IPv6 anyone?

Recently, I was fiddling in a terminal and I noticed something strange: a bunch of connections going to IPv6 addresses.

A while back, I subscribed to Hurricane's TunnelBroker and I got my own networks, a /48 and a /64. However, this IPv6 was not one of them, and I was really sure that the tunnel was done. Actually, the tunnel terminated on a small cisco router that's been sitting quietly in a cupboard for a few weeks.


Here is the output of my "ifconfig":


em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.6  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 2a00:1028:838a:1d8e:21d:60ff:fe04:f31c  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::21d:60ff:fe04:f31c  prefixlen 64  scopeid 0x20<link>
        ether 00:1d:60:04:f3:1c  txqueuelen 1000  (Ethernet)
        RX packets 442625  bytes 241048181 (229.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 482924  bytes 92626306 (88.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The IPv6 2a00:1028:838a:1d8e:21d:60ff:fe04:f31c subnet belongs to my provider, O2 Czech Republic (or Telefonica). So ... My ISP supports native IPv6? Cool!

Let's go further: as there is nothing in my small router's web interface, let's have a look through the CLI. Yep,  both the inside (br0) and outside (ppp0) interfaces have IPv6. Quite expected!


br0       Link encap:Ethernet  HWaddr B0:B2:DC:16:3A:4C  
          inet addr:10.0.0.138  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: 2a00:1028:838a:1d8e::1/64 Scope:Global
          inet6 addr: fe80::1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3932310 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4920649 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:633818668 (604.4 MiB)  TX bytes:43890958 (41.8 MiB)

ppp0      Link encap:Point-Point Protocol  
          inet addr:10.226.135.99  P-t-P:88.103.200.41  Mask:255.255.255.255
          inet6 addr: 2a00:1028:838a:1d8c::1/64 Scope:Global
          inet6 addr: fe80::b2b2:dcff:fe16:3a4c/10 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:4873418 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3806955 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:4266450464 (3.9 GiB)  TX bytes:623147288 (594.2 MiB)

When confronted to that, my first reaction is "Gosh! Firewall!". Here, that's fine: the firewall is configured to block everything that's not originating inside. This is confirmed by an online IPv6 scanner.

But then: "what if I put a rule that allows an IP on the Inside to be pinged from the Internet?"

Let's try it. It's only a try so I put the entry directly into the IPv6 FORWARD table. I found several sites that offer the ability to run a ping test to an IPv6 host. Here is the one I used. As expected, there are replies, versus none before the line was added.

Weird part is I do remember checking a few weeks ago and I had no IPv6 connectivity. So what happened?

On New Year's eve, my previous provider's supplied router died. So after a few calls and a few days, a tech from O2 showed up with a new router. I didn't really pay attention at the time, as I was quite busy with a number of other things.

The Model Number is P-660HN-T3A_IPv6, apparently a model specific to O2. When I looked up on the Zyxel website, I couldn't find any matching firmware; the latest vendor provided firmware dates back to 2011. Searching for "O2 IPv6" returns a few hits. However and funnily enough, it states that the P-66HN-T3A doesn't support IPv6 yet ...

Now, I have to contact my server hosting company in France, so they activate IPv6 as well. 

And one more task on my to-do list: continue playing with IPv6.








Friday, February 15, 2013

New Courses on MIT's OpenCourseWare

A few new courses available on MIT's OpenCourseWare:

Prediction: Machine Learning and Statistics

Prediction is an important step in science, with the ability to extend a theory to yet-unobserved phenomenon. Over the past decades, this has been extended by machine learning, a generic name to cover all the techniques and algorithms that can make predictions based on a set of data. MIT's 15.097 "Prediction: Machine Learning and Statistics" covers the most important parts of this field of Artificial Intelligence.

Introduction To MATLAB Programming

MATLAB has evolved a lot over the last few years and its domains of applications are limitless: modelization, data processing and visualization and so forth.  MIT's 18.S997 "Introduction to MATLAB Programming" will help those beginning with that software and explains the very basics and progress through a few elementary steps: root finding, plotting and some other computations.

Wednesday, February 13, 2013

Chinese hackers attacked New York Times computers for four months

That's not a first: opponents to non-democratic regimes being harassed because they revealed something nasty. This story is no different.

The NY Times published an article about China's leader, Wen Jiabao, and some possible financial "indelicacies" of his family.

The Chinese government informed the NY Times that there will be "consequences" to the article. And there were.

The attack apparently started on September 13, 2012. The initial vector seems to be a spear phishing attack, which lead to systems being compromised and remote access tools installed. On October 25 ,2012, AT&T informed the company that "suspicious communications were spotted." This puts the detection time to about a month, not a very long time in the APT world.

Mandiant was mandated to investigate the breach, and found that the attack was consistent with others perpetrated by Chinese hackers associated with the Chinese military. China has always either denied or refused to comment on such attacks.

The most likely goal of the attack was to find who told to the reporters, possibly for further "actions."

The article on Ars Technica is here.

Interestingly enough, the next day, an article was published mentioning that the Wall Street Journal was also hit by Chinese hackers, with the same intent: monitor and control the newspapers's coverage of China. The Washington Post also claimed its networks were compromised, probably by the same source.

In at least two cases, the antivirus provided by Symantec failed to detect the malware. Which is normal. An AV is only one component in a line of complex defenses, and relying solely on it is akin to just decide that your immune system is enough to cope with all the dirt you may find in the world, and ditch hospitals, doctors and hygiene.

In the NYTimes case, in addition to the AV and, most likely, other tools, the provider was involved into monitoring the activity. Which paid off: AT&T detected the "strange activity" which led to the discovery of the malware.

Monday, February 11, 2013

SIAM News - Editor names the best 10 algorithms of the 20th century

An interesting reading - SIAM's editor has picked his ten best algorithms developed during the 20th century.



Friday, February 8, 2013

The Necronomicon: H.P. Lovecraft's best weird tales

I just finished it. It took me a while but I enjoyed every page.




HP Lovecraft is a master in the horror. Not the horror that requires blood by the gallon, but the creeping, crawling horror that sneaks on you. He has a penchant for the smallness of man facing the Universe, and the inability of his mind to cope with what it can't understand.

A word of caution: some of the tales contain text that can be considered racist.

My favorite story: "The Dream Quest of Unknown Kadath."

Wednesday, February 6, 2013

Unlocking a Phone is now Illegal in the US

As reported by Ars Technica: since 01/26/2013, it is illegal in the US to unlock a phone to use it on another cell operator than the one intended. This is a consequence of a ruling that considers that software is not sold but rather licensed and that unlocking a cell is in violation of the Digital Millenium Copyright Act ("DMCA").

This doesn't cover jailbreaking.

Monday, February 4, 2013

Trojanized SSH Server found on Compromised Systems

Searchers at ESET have found a trojanized SSH server. How it got there in the first place is not clear, but the usual suspects are pointed: outdated softwares or modules, faulty Apache configuration ...

This evil Daemon has a few features: it ships all connecting username/password to the mother base, it has a built-in password that grant access to the compromised server regardless of password changes, and it even have a built-in SSH key that provides the same feature.

The ESET AV detects it as Linux/SSHDoor.A.

Friday, February 1, 2013

Student get expelled after testing vulnerability that can expose thousands

A classic story: someone finds a vulnerability that could be used to expose confidential information, reports it, checks later and gets pinned for that.

In this case, the student was explicitly told not to test anything further, which he breached.

The story on the Full Disclosure blog.

Quick reminder: if you don't have the explicit permissions of the system administrator, a contract with the management or any kind of document that shows you are authorized in a way or another: don't try to break into a computer. If the guy on the other end is not a good sport, you may end up in trouble. Even if you did it for the good cause.