Probably the number one answer is, the most definitive guidance on who owns what when, where and how is what your employment contract says. Everything else is speculation and while they are good guesses as to what the default position would be, a bulletproof answer requires inspection of your contract of employment. That said, going by what's usual practice... the answer is that, to put it in facebookesque terms, it's complicated.
First, most people here are entirely correct pointing out that the default position in most contracts of employment is transfer of certain rights to your work. By certain rights, I of course imply that some rights are not transferred. Let us consider an example.
Alice works for Bob Corp. She develops Blodget, a ground-breaking solution for a difficult cryptographic problem, while at work. Implemented as a software, it would net the company millions. Alice then leaves Bob Corp.
Now, Bob Corp would, under the standard transfer of rights clause, be entitled to economically exploit the invention -- there's no doubt about that. However, given that they let you open-source it, it's unlikely there'll be much of that going on.
Moral rights are another thing. Traditionally, artists, writers, performers &c. have certain unassignable moral rights -- these are basically 1) to be known as the author of the work, 2) to 'defend the work' (the right to argue with folks who think your product sucks). How far these are valid in the realm of tech has been a very contested territory, with some even calling moral rights for inventions an oxymoron. Some employers, for this reason limit their claims to economic rights.
In your current situation, what might well be best is to come to an agreement with your employer, such as them getting the right to be credited as your employer during development in return for you regaining control of the project. Agreements are always better than suing it out! Make sure, however, to enter into a properly witnessed, legally binding agreement. And, of course, to read your contract of employment properly (even if it's just for this one point).