Welcome to the forum!
http://www.nps.gov/yose/planyourvisit/backpacking.htm
Yes, you need a bear canister. No, you cannot hang food, the bears will get it, and it's against the rules. You can rent a canister - the park will rent a Garcia or you can rent one by mail from Wild Ideas, or from one of the local outfitters like REI. If you don't go out more than a week between stops at a resupply/store, you will be fine with the Garcia. If you want to hike for longer between resupplies, the Bearikade (one of the larger sizes) might be better and can be rented/purchased directly from Wild Ideas - and if it makes more sense to buy for the length of time you're out there, it would be very, very easy to sell it used if you don't want to keep it. I usually recommend the Bearikade to people who haven't used a bear canister before, packing them is an art form, and the first time you use it you'll see why. Foods in ziploc bags that flow together - granola, couscous, rice, oatmeal - are easier to pack in them than bricks of vac-sealed food.
There will be some places you can camp and use bear boxes - the High Sierra camps, the campgrounds, and Little Yosemite Valley all have bear boxes. But it sounds like you will be doing a lot more than those spots.
The above link will answer questions about permits (you need wilderness permits for each distinct trip you take into the backcountry, they are free if you do not reserve them). If you intend to start legs of your journey from very popular trailheads like Happy Isles, Sunrise, and Cathedral Lakes, or from Tuolumne Meadows area, you may have to be flexible in starting times. There are quotas for all the trailheads and they are very very strict about it. Carefully read the pages on food storage as well. You can incur stiff fines for not following their rules - the bears are very, very active in trying to get your food and they put all the responsibility of keeping them from doing so on the people.
There are a lot of guidebooks and maps you can get to plan your trips. Sierra North by Kathy Morey and Mike White would give you a lot of info on Yosemite and surrounding areas, which if you have a month would be helpful - personally, if I had a month, I would be spending a good portion of it on the John Muir trail, which ends on Mt Whitney. Yosemite is a beautiful place, absolutely, but the Sierras are full of beauty and a lot of it is on that trail, which also passes through Sequoia-Kings Canyon to the south.
If you want to spend your entire trip inside the park there are shuttles to help you get around and YARTS to help you get into the park in the first place.
www.yarts.com and
www.yosemitepark.com (for shuttles within the park, stores, and accommodations including the High Sierra Camps and hotels) will have detailed information on fees and schedules. There are a few stores that will have backpacking supplies and general groceries, in Tuolumne Meadows, Curry Village and Yosemite Village in the valley, and at Wawona.
If you only visit Yosemite once, the must-sees would be basically the WHOLE PARK.
But in particular, Glacier Road (Sentinel Dome, Taft/Dewey/Crocker Points, Glacier Point, and the trailheads to Ostrander Lake/Lost Bear Meadow/Mono Meadow/Ilillouette Falls), the valley itself with all its crowds, and Tioga Road (many many trailheads and overlooks). Hiking Happy Isles to Half Dome and points beyond is standard - with the time you have, I would do it in reverse, ride the hiker bus out to Sunrise trailhead or Cathedral trailhead, hike from Tioga Road down to Happy Isles, stopping at Clouds Rest and Half Dome on the downhill rather than going up. They are actually on the first leg of the John Muir Trail, the official starting trailhead is Happy Isles. The redwood groves are nice but the trails don't really connect with backpacking trails. In summer the shuttles and hiker bus will help you get to them.
You might consider having a day for riding a tour bus to Glacier Point, doing the tourist thing, and hitting the Pohono or Panorama trail (with permit) from there. (You'll want to pay special attention to where you can actually camp on this trail, around Bridalveil Creek, since you can't camp between the point and Bridalveil.) Walking along the south rim to Wawona Tunnel and catching a shuttle or hitching a ride (or walking) down into the valley, doing tourist things for a day while camping in the backpacker campground (the cheapest place to stay, and only for the night before or after your backpack(s)), and hitting the trail from Happy Isles and out. If you end up at Tuolumne Meadows from there, you can ride the hiker bus (small fee, depending on destination) to another trailhead and go to any of the numerous Tioga Pass destinations, including the north rim (stopping at North Dome, El Capitan, Eagle Peak and similar overlooks).
All hypotheticals, and all dependent on your physical fitness and ability to hike multiple outings one after the other - I hope you intend to condition yourself for this, as it's a lot of hiking up and down some steep terrain. The trails themselves are well maintained but the elevation gain can really hit you hard if you have not hiked at that elevation much. The most important part of your planning should be for your safety -- you might want to be flexible enough and have enough resources that if you do one backpack, and you are struggling, you might re-do your itinerary with short dayhikes and longer front-country stays, instead of spending the entire month backpacking. It might be prudent, if you don't know for certain how you will react at elevations 5,000-12,000 feet, to plan the first few weeks in areas of the park that are lower, giving you time to acclimate before heading up trails to Ten Lakes Pass or Donahue Pass.
Order some Harrison Maps and some guidebooks. You'll find comprehensive information to make more informed decisions on routing in them.