Are there any cryptographic hash functions for which there is a known pre-image attack, or a known second pre-image attack, but not both?

The attack doesn't have to be practical - just anything that beats the security claim of the hash function.

Intuitively, 2nd pre-image attacks would be easier to find than pre-image attacks, but I'm not aware of any examples or that either property implies the other.

I believe there are no known pre-image attacks on the common crop of hash functions in use today, so I'm interested in historic, obsolete and proposed-but-not-adopted hash functions, but not toy hash functions constructed specifically to demonstrate the possibility of such attacks.

I have been developing pages and web parts in SharePoint 2007/2010 for the past year. One of the things that I always incorporate in my code is try/catch blocks to deal with error handling if an exception is thrown. That way, if I have a web part that breaks, I show a nice error message to the user in that specific web part, rather than at the top of the page or a full page error. I am fine with this process, but I am looking for some input on my approach of using try/catch blocks (as I understand that there can be performance implications).

In general, I always use try/catch blocks when conducting DB or web service calls. I will even sometimes wrap my generic C# code in try/catch blocks if there is complicated logic that is implemented (and I haven't been able to test all the different cases). Sometimes, I just have a little paranoia going on and will wrap all the code in an entire web part with a try/catch.

Can I please get some feedback on the use of try/catch blocks for general C# development, and specifically with C# development in the SharePoint world? Additionally, I would love to understand how to effectively embed try/catches in my C# code while developing SharePoint solutions (is there a more global way of doing this?)

Thanks in advance.

I wonder how to find the girth of a sparse undirected graph. By sparse I mean $|E|=O(|V|)$. By optimum I mean the lowest time complexity.

I thought about some modification on Tarjan's algorithm for undirected graphs, but I didn't find good results. Actually I thought that if I could find a 2-connected components in $O(|V|)$, then I can find the girth, by some sort of induction which can be achieved from the first part. I may be on the wrong track, though. Any algorithm asymptotically better than $\Theta(|V|^2)$ (i.e. $o(|V|^2)$) is welcome.

Follow up to this question: How would earth goverments respond to killing of most of a colony to keep the rest alive long enough for rescue but with a different approach.

The same scenario occurs. The first colony to mars suffers a disaster. To clarify points form last time this is an early colony designed only to prove that mars colonization is possible. It has no children, only 1,000 highly skilled men and women who signed up for a dangerous proof-of-concept mission. These men and women come from multiple nations and was launched as multinational effort, spearheaded by most of the big superpower economic nations.

The colony has been on mars for a year or two. It has managed to create a system that can produce sufficient food to provide for all colonists, even a slight excess. Things are looking good when martian weather strikes, the equivalent of a tornado or other natural disaster strikes the dome, a freak accident as the odds of such a storm occurring and striking the small colony were absurdly low. The hydroponics area is destroyed, as is much of their com equipment.

They know that Earth will realize they lost coms within a day or two when they don't make their schedule communications and start to organize a rescue mission. However, it will take some time to organize and reach them and they lack the food to survive that long.

The governor makes a difficult decision, he arranges for 600 people to be killed to save the remaining 400 from starving. He arranges to poison their food supply, without telling anyone beyond a very select few required to enact the plan because he knows some of the citizens would not cooperate. He uses a semi-random approach. He selects some that must survive (like anyone with knowledge on how to keep what limited food production they still have running), and a few that will definitely die due to other illness and any who have had an emotional breakdown from the stress and are no longer functioning. He also selects a few groups of which he needs to ensure at least one survive, for instance one of 3 trained in servicing the life support must survive etc. Beyond those he picks to save to preserve the colony he arranges for most of the rest to have a random chance of being poisoned. In total he decided the absolute fate of ~75 citizens, the rest are given a random chance rather or not their poisoned.

On other catch, he chooses to poison himself, knowing that he will almost certainly be sentenced to death for this decision were he to survive. He does, however, ensure his second in command will not be poisoned since someone needs to lead. He does not explicitly tell his second of his plan, though it's clear that the second could easily infer it was going on the governor orders him not to ask any questions and simply focus on learning everything needed to prepare him for keeping the colony alive until rescue comes. those few others who knew about the plan are all poisoned as well.

When rescue arrives most of the 400 not poisoned are alive but close to starvation, in fact another 100 or so die before the situation stabilizes, since the rescue mission did not know to bring a stockpile of food and even though they could help fix the hydroponics to start growing food it would take some time before the colony could again sustain itself. It is impossible to evacuate all of the colonists back home with the first rescue ship, so many are left in a partially repaired colony.

The Earth people have been watching this news during the many months it took for rescue mission to be set up, sent, and reach mars. During this time they had mostly given up on any of the martians surviving, until word comes of their partial survival and of the slaughter that happened.

My question, how will society respond to this news? All the collaborators who arranged the killing are already dead, though the second in command, who was chosen to be saved, was in a position where he likely could have inferred something was going on, knowing the governor clearly had a horrible plan he wasn't talking about and didn't expect to live after it etc.

First, will the world lash out at the second in command who was saved, and did lead the colony quite successfully in crises until rescue arrived by trying to punish him?

Secondly, what will the cultural and political ramifications of one of the worlds first huge multinational attempts to reach out to space failing like this have? How will the survivors be treated, particularly those unknowingly chosen by the governor to survive without being part of the deadly lottery? Will hostilities be sparked over it, or will they world unite around those that survived what they had long ago decided must be an unsurvivable situation?

Will the mars colony experiment survive, or will they give up trying to repair the rest of the colony and instead evacuate the rest of the survivors home over subsequent missions? Keep in mind ships sent to mars, for evacuation or with supplies to do a more perminate repair to the dome, are extremely expensive.

I am trying to populate an email address with a subject line and body text like this

This works just for the email [link](mailto:[email protected]) but once I start adding the subject it does not work any more.

[link](mailto:[email protected]?subject=free chocolate)

Is there something about mardown I am not understanding or is it a Trello limitation?

Thank you

My situation is a rather easy one.

For the last two years I have been working for a company, and they have been giving me short term contracts. Anything from one week to one month. At the end of my contract it is assumed that I will come the following day, because I am actually fulfilling a permanent employees role, and I will be given another contract to sign. Hiring decisions are not done in our office, and they have recommended me for a permanent job, but this company is big and saves a lot of money with this scheme.

I have now been hired by a different company. They have given me a permanent job with much better salary which is also actually in my field.

Here is the problem. I found out that I have a new job 1 week before the end of my current contract, but with the holidays there will be only 2 working days left to inform my current employer, that I will not be signing a new contract. I do not have a notice period, but I still feel that 2 days is a short period of time, since they need to find a replacement. (This should not be to difficult. The job does not require a lot of training.)

I like my current work place and I don't want to make things difficult for them. How should I tell my my current employer that I am not signing a new contract, in a friendly way, that might also leave the possibility open of returning?

Update Thank you for all the responses. If you would like to know what happened when I spoke with my current management, and also the reason for my choice, please see my comment on the chosen answer.

I can't remember where, but it was stated or heavily implied that droids cannot be force-sensitive due to their bionic nature (and also because they can't have midichlorions in their 'bloodstream').

Luke has his arm chopped off and replaced with a bionic hand, and Vader is "more machine than man' by the time he and Luke fight.

Do these bionic implants impede their ability to use the Force at all?

I understand that Jehovah's Witnesses believe that "exactly 144,000 faithful Christians go to heaven to rule with Christ in the kingdom of God."

However, in Revelation the 144 000 are from Israel Revelation 7:4:

Then I heard the number of those who were sealed: 144,000 from all the tribes of Israel.

Indeed, the next four verses detail the tribes from which they came.

So do Jehovah's Witnesses believe the 144 000 are from Israel? If not, how do they explain this text?

Should go without saying, but just for clarity: I'm curious, not trying to start an argument!

When I first heard of namecoin an address costed 50 NMC, now they are priced 0.01 NMC.

This means they are as much as free, and the only thing preventing someone from just brute-force registering tons of them is... that it is pointless to do so, because due to this problem itself, namecoin is essentially a worthless project.

Using a bitcoin-like currency to handle DNS was a nice idea at first, and I have no clue about what could have caused them to mishandle the design so much.

Question is, did they state somewhere the reasons behind this apparently foolish decision to set the registration prices to "basically free" after a little while? Didn't anyone point out how stupid that idea was?

If a person is working in the industry and wants to ask a few questions to an academic researcher (based on a paper published by them), what is the correct protocol to follow?

  1. Should they disclose their affiliations right away? Should the academic ask for it right away?
  2. Should they say 'I don't want to tell you why I'm asking this for, but can you please tell me so and so'? Should the academic insist on knowing?
  3. Any other consideration?